From be9bad3d90c53cff836ecde82c262d0ed4d5b9f7 Mon Sep 17 00:00:00 2001 From: Simon Pelchat Date: Fri, 27 Apr 2018 14:10:38 -0700 Subject: [PATCH] Fix #229: add missing character in onscript event. --- lib/sax.js | 2 +- test/issue-229.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 test/issue-229.js diff --git a/lib/sax.js b/lib/sax.js index 795d607e..2428cf72 100644 --- a/lib/sax.js +++ b/lib/sax.js @@ -1437,7 +1437,7 @@ } else if (isMatch(nameBody, c)) { parser.tagName += c } else if (parser.script) { - parser.script += 'a = "";', + expect: [ + ['opentagstart', {name: 'script', attributes: {}}], + ['opentag', {name: 'script', attributes: {}, isSelfClosing: false}], + ['script', 'a = "";'], + ['closetag', 'script'] + ], + strict: false, + opt: {lowercasetags: true, noscript: false} +})