summaryrefslogtreecommitdiff
path: root/enc/trans
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-07 11:03:24 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-07 11:03:24 +0000
commita3cfd3233e6b3a98e6b47a40e3ff09c5de18f1a5 (patch)
tree187bedf5f9037d034422e6f4abb86fb269e46bcf /enc/trans
parentfaa1387484e3ac01af60c8bbca1850879aaf9b69 (diff)
* enc/trans/escape.trans (hexstr): renamed from str1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/trans')
-rw-r--r--enc/trans/escape.trans18
1 files changed, 9 insertions, 9 deletions
diff --git a/enc/trans/escape.trans b/enc/trans/escape.trans
index 95977bde61..cc1513724b 100644
--- a/enc/trans/escape.trans
+++ b/enc/trans/escape.trans
@@ -1,28 +1,28 @@
#include "transcode_data.h"
<%
- def str1(str)
+ def hexstr(str)
str.unpack("H*")[0]
end
transcode_tblgen("", "amp-escaped", [
["{00-25,27-FF}", :nomap],
- ["26", str1("&amp;")]
+ ["26", hexstr("&amp;")]
])
transcode_tblgen("", "xml-text-escaped", [
["{00-25,27-3B,3D,3F-FF}", :nomap],
- ["26", str1("&amp;")],
- ["3C", str1("&lt;")],
- ["3E", str1("&gt;")]
+ ["26", hexstr("&amp;")],
+ ["3C", hexstr("&lt;")],
+ ["3E", hexstr("&gt;")]
])
transcode_tblgen("", "xml-attr-content-escaped", [
["{00-21,23-25,27-3B,3D,3F-FF}", :nomap],
- ["22", str1("&quot;")],
- ["26", str1("&amp;")],
- ["3C", str1("&lt;")],
- ["3E", str1("&gt;")]
+ ["22", hexstr("&quot;")],
+ ["26", hexstr("&amp;")],
+ ["3C", hexstr("&lt;")],
+ ["3E", hexstr("&gt;")]
])
map_xml_attr_quote = {}