diff --git a/lib/common/html_re.js b/lib/common/html_re.js index f4264dcb..a81ae7c6 100644 --- a/lib/common/html_re.js +++ b/lib/common/html_re.js @@ -41,10 +41,10 @@ var open_tag = replace(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/) (); var close_tag = /<\/[A-Za-z][A-Za-z0-9]*\s*>/; -var comment = //; +var comment = /|/; var processing = /<[?].*?[?]>/; var declaration = /]*>/; -var cdata = /])*\]\]>/; +var cdata = //; var HTML_TAG_RE = replace(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/) ('open_tag', open_tag) diff --git a/test/fixtures/remarkable/redos.txt b/test/fixtures/remarkable/redos.txt new file mode 100644 index 00000000..6142ae37 --- /dev/null +++ b/test/fixtures/remarkable/redos.txt @@ -0,0 +1,11 @@ +. +ReDoS +. +
ReDoS<![CDATA[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]] >
+. + +. +z +. +z<!–aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa—>
+.