Encode closing Tag
See original GitHub issueCurrently encoding in the index.js only includes
const ENCODE = [
['&', '&'],
['>', '>'],
];
If a component is being rendered SSR and includes a property with a closing script tag, the script tag in the SSrendered HTML will close the hypernova script.
<script type="application/json" data-hypernova-key="App" data-hypernova-id="....">
<!-- {"props": ..., "title":"</script "}
which will throw an error in the JSON.parse method of the payload.
is there a reason closing tags are not encoded here ? Following changes would suffice:
var ENCODE = [
['&', '&'],
['>', '>'],
['<', '<']
];
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8
Top Results From Across the Web
HTML URL Encoding Reference - W3Schools
Character From Windows‑1252 From UTF‑8
space %20 %20
! %21 %21
" %22 %22
Read more >Encode and decode a piece of text to its HTML equivalent
The HTML character encoder converts all applicable characters to their ... to use the < character as it is used in the HTML...
Read more >Escape </ in script tag contents - html - Stack Overflow
I came here looking for a way to universally escape </script> inside the JavaScript code. After bit of research I figured that if...
Read more >WebD2: Common HTML Tags - University of Washington
An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text...
Read more >html_escape - Rust - Docs.rs
For example, to put a text between a start tag <foo> and an end tag </foo> , use the encode_text function to escape...
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 Free
Top 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
This is what could happen
It seems like indeed
</
specifically should be escaped.