Escape a JSON payload for safe embedding inside a ` ` element: the `<`, `>`, and `&` bytes are rewritten to their `\u00XX` JSON escapes so the literal sequence ` ` (and `<!--`) can never terminate the tag.
(s: &str)
| 751 | /// `<`, `>`, and `&` bytes are rewritten to their `\u00XX` JSON escapes so the |
| 752 | /// literal sequence `</script>` (and `<!--`) can never terminate the tag. |
| 753 | fn escape_script_json(s: &str) -> String { |
| 754 | s.replace('&', "\\u0026") |
| 755 | .replace('<', "\\u003c") |
| 756 | .replace('>', "\\u003e") |
| 757 | } |
| 758 | |
| 759 | const FILTER_SCRIPT: &str = r#"function filterFindings(sev){ |
| 760 | document.querySelectorAll('.finding').forEach(function(el){ |