change url scheme recognition for allowing abasurl to link

autolinking is not working for abasurl as it contains not url conform characters so you would still have to link it manually but it is not sanitized anymore.
This commit is contained in:
Christian Hillebrand 2021-03-08 10:48:50 +01:00 committed by GitHub
parent ff4f5e6c04
commit fdb4980b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ function mySafeAttrValue(tag, name, value, cssFilter) {
// then use your custom function
if (tag === 'a' && name === 'href') {
// only filter the value if starts with an registered url scheme
urlscheme = value.split(/:\/\//);
urlscheme = value.split(/:/);
//console.log("validating "+urlscheme[0]);
if(urlschemes.includes(urlscheme[0])) return value;
else {