question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML report doesn't escape closing `</script>` tags

See original GitHub issue

Steps to reproduce:

  1. Visit healthcare.gov and go through healthcare application until you reach /marketplace/auth/enroll/consumers/?a=[application_id]&cache=true&t=[state]#/
  2. Run lighthouse
  3. See this result:

2016-11-21 12-59-15

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 (!):

2016-11-21 13-05-54

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
llimllibcommented, Nov 22, 2016

And thanks for the quick response and fix! 💯

0reactions
brendankennycommented, Nov 22, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found