Try to allow links to onenote, mailspring and file.

Thanks to lime918, rgalonso, ocdtrekkie, gkarachuk and xet7 !

Fixes #1615
This commit is contained in:
Lauri Ojansivu 2021-01-13 00:02:17 +02:00
parent 4b3270e82a
commit 3977f2187a
2 changed files with 24 additions and 16 deletions

View file

@ -275,7 +275,10 @@ function mySafeAttrValue(tag, name, value, cssFilter) {
if (
/^thunderlink:/gi.test(value) ||
/^cbthunderlink:/gi.test(value) ||
/^aodroplink:/gi.test(value)
/^aodroplink:/gi.test(value) ||
/^onenote:/gi.test(value) ||
/^file:/gi.test(value) ||
/^mailspring:/gi.test(value)
) {
return value;
} else {

View file

@ -13,7 +13,12 @@ function mySafeAttrValue(tag, name, value, cssFilter) {
// then use your custom function
if (tag === 'a' && name === 'href') {
// only filter the value if starts with 'cbthunderlink:' or 'aodroplink'
if (/^thunderlink:/ig.test(value) || /^cbthunderlink:/ig.test(value) || /^aodroplink:/ig.test(value)) {
if (/^thunderlink:/ig.test(value) ||
/^cbthunderlink:/ig.test(value) ||
/^aodroplink:/ig.test(value) ||
/^onenote:/ig.test(value) ||
/^file:/ig.test(value) ||
/^mailspring:/ig.test(value)) {
return value;
}
else {