diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2021-02-15 17:24:11 +0000 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-03-16 13:27:37 +0000 |
commit | 7010ea90e14305837a30764db8a5e4bc1338e378 (patch) | |
tree | 31a674fad95261e123e1cd2348f24c11f51373c4 /catalog-ui/src/app/utils/validation-utils.ts | |
parent | 77680c6f9d99adcf5c6a97380043f1d86b0d46fa (diff) |
Fix Security Vulnerabilities
Issue-ID: SDC-3500
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: I3fa2ed2bc3a170d8256fbc91c98bbfbaf5c0a403
Diffstat (limited to 'catalog-ui/src/app/utils/validation-utils.ts')
-rw-r--r-- | catalog-ui/src/app/utils/validation-utils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/catalog-ui/src/app/utils/validation-utils.ts b/catalog-ui/src/app/utils/validation-utils.ts index b7e43f79ba..bcb49d8b89 100644 --- a/catalog-ui/src/app/utils/validation-utils.ts +++ b/catalog-ui/src/app/utils/validation-utils.ts @@ -64,7 +64,10 @@ export class ValidationUtils { if (!text) { return null; } - return text.replace(/\s+/g, ' ').replace(/%[A-Fa-f0-9]{2}/g, '').trim(); + return text.replace(/\s+/g, ' ').replace(/%[A-Fa-f0-9]{2}/g, '') + .replace(/&/g, "&").replace(/>/g, ">") + .replace(/</g, "<").replace(/"/g, """) + .replace(/'/g, "'").trim(); } public getValidationPattern = (validationType:string, parameterType?:string):RegExp => { |