summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-04-07 15:09:34 +0300
committerAlon Levy <alon@pobox.com>2015-04-07 15:09:34 +0300
commit275eb79a3807d3f5f40775e71c6880f30b1a5064 (patch)
tree3268a38174ca950849d100cd0826c048357e0587
parent28926f9a00b9dc43c975dda5897625626edc855c (diff)
res/templates/index.html: unquote rzdoc_cur__name; resolve #439
-rw-r--r--res/templates/index.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/res/templates/index.html b/res/templates/index.html
index 86096023..e395cefd 100644
--- a/res/templates/index.html
+++ b/res/templates/index.html
@@ -19,6 +19,16 @@ var rz_config = { // set as a global variable
'separator_string': ' ',
};
+function unquote_xml(s) {
+ return s.replace('&amp;', '&').replace('&apos;', "'")
+ .replace('&quot;', '"').replace('&gt;', '>')
+ .replace('&lt;', '<').replace(/&#(..);/g, function (_, d) {
+ return String.fromCharCode(d); }
+ );
+}
+
+rz_config.rzdoc_cur__name = unquote_xml(rz_config.rzdoc_cur__name);
+
var RZ_VERSION = '{% include "fragment/version.txt" %}';
</script>
<script data-main='/static/app.js' src="/static/lib/require.js"></script>