Sanitizsation of incoming variables that are added to the userStyles

This commit is contained in:
Knut Sveidqvist
2022-06-21 21:46:37 +02:00
parent ec2da8e85d
commit 610f154c74
3 changed files with 38 additions and 0 deletions

View File

@@ -1032,6 +1032,14 @@ export const directiveSanitizer = (args) => {
log.debug('sanitizing themeCss option');
args[key] = sanitizeCss(args[key]);
}
if (key.indexOf('fontFamily') >= 0) {
log.debug('sanitizing fontFamily option');
args[key] = sanitizeCss(args[key]);
}
if (key.indexOf('altFontFamily') >= 0) {
log.debug('sanitizing altFontFamily option');
args[key] = sanitizeCss(args[key]);
}
if (configKeys.indexOf(key) < 0) {
log.debug('sanitize deleting option', key);
delete args[key];