JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix escaped script tags too
authorJason Woofenden <jason@jasonwoof.com>
Wed, 23 Dec 2015 20:16:29 +0000 (15:16 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Wed, 23 Dec 2015 20:16:29 +0000 (15:16 -0500)
parse-html.coffee

index cea8fa1..8b2712d 100644 (file)
@@ -3343,6 +3343,11 @@ parse_html = (args) ->
                                tok_state = tok_state_self_closing_start_tag
                                return
                        # fall through
+               if c is '>'
+                       if is_appropriate_end_tag tok_cur_tag
+                               tok_state = tok_state_data
+                               return tok_cur_tag
+                       # fall through
                if is_uc_alpha(c)
                        tok_cur_tag.name += c.toLowerCase()
                        temporary_buffer += c.toLowerCase()