diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 98e538933..100eec15d 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -1354,7 +1354,19 @@ fixmystreet.display = { } var found = html.match(/<title>([\s\S]*?)<\/title>/); - var page_title = found[1]; + // Unencode HTML entities so it's suitable for document.title. We + // only care about the ones encoded by the template's html_filter. + var map = { + '&': '&', + '>': '>', + '<': '<', + '"': '"', + ''': "'" + }; + var page_title = found[1].replace(/&(amp|lt|gt|quot|#39);/g, function(m) { + return map[m]; + }); + fixmystreet.page = 'report'; $('.big-hide-pins-link').hide(); |