We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b317c9 commit 0da6c8fCopy full SHA for 0da6c8f
packages/kit/src/utils/escape.js
@@ -21,15 +21,15 @@ const escape_json_string_in_html_dict = {
21
};
22
23
/**
24
- * Escape a JSON string to be embedded into a `<script>` tag
+ * Escape a stringified JSON object that's going to be embedded in a `<script>` tag
25
* @param {string} str
26
*/
27
export function escape_json_in_html(str) {
28
return escape(str, escape_json_in_html_dict, (code) => `\\u${code.toString(16).toUpperCase()}`);
29
}
30
31
32
- * Escape a stringified JSON object that's going to be embedded in a `<script>` tag
+ * Escape a string JSON value to be embedded into a `<script>` tag
33
34
35
export function escape_json_string_in_html(str) {
0 commit comments