From 22aab82f4edaa3614fbd6bcbd885bcbb674fbf66 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 30 Mar 2023 12:13:18 +0200 Subject: [PATCH] MOBILE-4269 h5p: Rename whitelist word --- src/core/features/h5p/classes/content-validator.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/features/h5p/classes/content-validator.ts b/src/core/features/h5p/classes/content-validator.ts index 002308fd5..3dec4b47b 100644 --- a/src/core/features/h5p/classes/content-validator.ts +++ b/src/core/features/h5p/classes/content-validator.ts @@ -585,14 +585,14 @@ export class CoreH5PContentValidator { } /** - * Check params for a whitelist of allowed properties. + * Check params for a allowlist of allowed properties. * * @param params Object to filter. - * @param whitelist List of keys to keep. + * @param allowlist List of keys to keep. */ - filterParams(params: Record, whitelist: string[]): void { + filterParams(params: Record, allowlist: string[]): void { for (const key in params) { - if (whitelist.indexOf(key) == -1) { + if (allowlist.indexOf(key) == -1) { delete params[key]; } } @@ -625,7 +625,7 @@ export class CoreH5PContentValidator { // Defuse all HTML entities. text = text.replace(/&/g, '&'); - // Change back only well-formed entities in our whitelist: + // Change back only well-formed entities in our allowed list: // Decimal numeric entities. text = text.replace(/&#([0-9]+;)/g, '&#$1'); // Hexadecimal numeric entities.