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)
| 743 | /// `<`, `>`, and `&` bytes are rewritten to their `\u00XX` JSON escapes so the |
| 744 | /// literal sequence `</script>` (and `<!--`) can never terminate the tag. |
| 745 | fn escape_script_json(s: &str) -> String { |
| 746 | s.replace('&', "\\u0026") |
| 747 | .replace('<', "\\u003c") |
| 748 | .replace('>', "\\u003e") |
| 749 | } |
| 750 | |
| 751 | const FILTER_SCRIPT: &str = r#"function filterFindings(sev){ |
| 752 | document.querySelectorAll('.finding').forEach(function(el){ |