Fix sanitise function

HTML uses `>` to encode `>` characters.
This commit is contained in:
Raphaël Jorel 2021-02-12 10:59:49 +01:00 committed by Matt Triff
parent f0ec43fa20
commit 2222f767a9

View file

@ -93,7 +93,7 @@ export const sanitise = <T>(value: T | string): T | string => {
return value
.replace(/&/g, '&amp;')
.replace(/>/g, '&rt;')
.replace(/>/g, '&gt;')
.replace(/</g, '&lt;')
.replace(/"/g, '&quot;');
};