Skip to content

Commit d851ccf

Browse files
docs(html): cut the JSON stripper's description to two sentences
1 parent 8528ac7 commit d851ccf

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎lib/html/builtinEmbeddedRenderer.js‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ let _cssSyntax;
2424
let _htmlSyntax;
2525

2626
/**
27-
* Strip the whitespace between a JSON body's tokens. Every literal is copied
28-
* byte for byte — re-serializing would reorder nothing but would round numbers
29-
* through a double, drop a duplicate key and rewrite escapes, none of which is
30-
* this transform's to do. Escapes are also the security case: unescaping a
31-
* `<` lets a string close the `<script>` early.
27+
* Strip the whitespace between a JSON body's tokens, every literal copied byte
28+
* for byte. Re-serializing would round numbers, drop a duplicate key and rewrite
29+
* the escapes that keep a string from closing the `<script>` early.
3230
* @param {string} json a `<script>` body
3331
* @returns {string} the stripped body, or the body as written where it is not JSON
3432
*/

0 commit comments

Comments
 (0)