HTML report doesn't escape closing `</script>` tags
See original GitHub issueSteps to reproduce:
- Visit healthcare.gov and go through healthcare application until you reach
/marketplace/auth/enroll/consumers/?a=[application_id]&cache=true&t=[state]#/
- Run lighthouse
- See this result:
I’ve attached the entirety of the report html at: https://gist.github.com/llimllib/931b448c9ec5cf7477959d9022210b18 . As you can see, line 1699 appears to be perfectly syntactically valid. Could this instead be a Chrome bug?
Google Chrome Version 54.0.2840.98 (64-bit) MacOS Sierra Lighthouse 1.2.0
It’s interesting to note that the developer tools stops syntax highlighting properly at line 1699, which really makes me think this might be a parser error (!):
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Programatically escape / script closing tag in javascript
There can be a code that contains / inside the script tag. This scripts will be programmatically added to HTML. I will be...
Read more >innerHTML on a script tag escapes tag characters #14975
This comment explains the case in which the code does not operate correctly and chooses to escape the element contents when it should...
Read more >HTML 5.1: 8. The HTML syntax - W3C
Foreign elements whose start tag is not marked as self-closing can have text, character references, CDATA sections, other elements, and comments ...
Read more >Escaping from HTML - Manual - PHP
Escaping from HTML ¶. Everything outside of a pair of opening and closing tags is ignored by the PHP parser which allows PHP...
Read more >HTML Standard
1 Introduction; 2 Common infrastructure; 3 Semantics, structure, and APIs of HTML documents; 4 The elements of HTML; 5 Microdata; 6 User interaction ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And thanks for the quick response and fix! 💯
fixed n #1003
FWIW, DevTools has always had some issues with syntax highlighting very long text input. I would be very surprised if there wasn’t an existing bug and/or it wasn’t working as intended for performance reasons.