Download tasks/codeql_javascript_benchmark_top30_v1/morefixes-4ffaae63e8f8c0012a0f/patch.diff from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 602 Bytes
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_javascript_benchmark_top30_v1/morefixes-4ffaae63e8f8c0012a0f/patch.diff
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/codeql_javascript_benchmark_top30_v1/morefixes-4ffaae63e8f8c0012a0f/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_javascript_benchmark_top30_v1/morefixes-4ffaae63e8f8c0012a0f/patch.diff
602 Bytes
| diff --git a/client/app/utils/index.js b/client/app/utils/index.js | |
| index 7bd7b039..b0015344 100644 | |
| --- a/client/app/utils/index.js | |
| +++ b/client/app/utils/index.js | |
| // @flow | |
| import axios from 'axios'; | |
| import renderHTML from 'react-render-html'; | |
| +import { sanitize } from 'dompurify'; | |
| const randomString = () => Math.random() | |
| .toString(36) | |
| const getPusher = () => { | |
| const renderContent = (content: string | any) => { | |
| if (typeof content === 'string') { | |
| - return renderHTML(content); | |
| + return renderHTML(sanitize(content)); | |
| } | |
| return content; | |
| }; | |