Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 11 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | function escapeHtml(unsafe: string): string { |
||
2 | return unsafe |
||
3 | .replaceAll("&", "&") |
||
4 | .replaceAll("<", "<") |
||
5 | .replaceAll(">", ">") |
||
6 | .replaceAll('"', """) |
||
7 | .replaceAll("'", "'"); |
||
8 | } |
||
9 | |||
10 | export default escapeHtml; |
||
11 |