From 275eb79a3807d3f5f40775e71c6880f30b1a5064 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 7 Apr 2015 15:09:34 +0300 Subject: res/templates/index.html: unquote rzdoc_cur__name; resolve #439 --- res/templates/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) 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('&', '&').replace(''', "'") + .replace('"', '"').replace('>', '>') + .replace('<', '<').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" %}'; -- cgit v1.3.1