Better fix for </script> in JSON bug

This commit is contained in:
Gaël Métais
2014-09-10 18:48:35 +02:00
parent 2b86a5fdc6
commit 8ecfcee83c
+1 -2
View File
@@ -36,8 +36,7 @@ var resultsController = function(req, res, googleAnalyticsId) {
// Escape "</script>" because it can interfer with the HTML parser
var phantomasResults = results.phantomasResults;
phantomasResults = phantomasResults.replace('</script>', '\\u003c/script>');
phantomasResults = phantomasResults.replace(/<\/script>/g, '\\u003c/script>');
var html = results.htmlTemplate;
html = html.replace('%%METADATA%%', results.phantomasMetadata);