(string)
| 777 | } |
| 778 | |
| 779 | function sanitizeQueryString(string) { |
| 780 | const map = { |
| 781 | '<': '<', |
| 782 | '>': '>', |
| 783 | '"': '"', |
| 784 | "'": ''', |
| 785 | '/': '/' |
| 786 | }; |
| 787 | const reg = /[<>"'/]/gi; |
| 788 | return string.replace(reg, (match) => map[match]); |
| 789 | } |
| 790 | |
| 791 | export { |
| 792 | randomId, |
no outgoing calls
no test coverage detected