2
0
Fork 0

MOBILE-3213 h5p: Fix closing tag in content validator

main
Dani Palou 2019-12-17 11:41:19 +01:00
parent 3d5041de7c
commit e92a615fd5
1 changed files with 4 additions and 4 deletions

View File

@ -503,7 +503,7 @@ export class CoreH5PContentValidator {
continue; continue;
} }
// Find semantics for name=$key // Find semantics for name=key.
let found = false, let found = false,
fn = null, fn = null,
field = null; field = null;
@ -729,7 +729,7 @@ export class CoreH5PContentValidator {
} }
if (slash != '') { if (slash != '') {
return '</$elem>'; return '</' + elem + '>';
} }
// Is there a closing XHTML slash at the end of the attributes? // Is there a closing XHTML slash at the end of the attributes?
@ -871,8 +871,8 @@ export class CoreH5PContentValidator {
* Processes an HTML attribute value and strips dangerous protocols from URLs. * Processes an HTML attribute value and strips dangerous protocols from URLs.
* *
* @param str The string with the attribute value. * @param str The string with the attribute value.
* @param decode Whether to decode entities in the $string. * @param decode Whether to decode entities in the str.
* @return Cleaned up and HTML-escaped version of $string. * @return Cleaned up and HTML-escaped version of str.
*/ */
filterXssBadProtocol(str: string, decode: boolean = true): string { filterXssBadProtocol(str: string, decode: boolean = true): string {
// Get the plain text representation of the attribute value (i.e. its meaning). // Get the plain text representation of the attribute value (i.e. its meaning).