MOBILE-4269 h5p: Rename whitelist word
parent
dfe185f28c
commit
22aab82f4e
|
@ -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<string, unknown>, whitelist: string[]): void {
|
||||
filterParams(params: Record<string, unknown>, 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.
|
||||
|
|
Loading…
Reference in New Issue