You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
inplace-edit on attribs
This commit is contained in:
@@ -49,11 +49,12 @@ var sanitizeHtmlParams = {
|
|||||||
'a': function(tagName, attribs) {
|
'a': function(tagName, attribs) {
|
||||||
var m = attribs.href ? attribs.href.match(linkifyMatrix.VECTOR_URL_PATTERN) : null;
|
var m = attribs.href ? attribs.href.match(linkifyMatrix.VECTOR_URL_PATTERN) : null;
|
||||||
if (m) {
|
if (m) {
|
||||||
return { tagName: 'a', attribs: { href: attribs.href, name: attribs.name } };
|
delete attribs.target;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return { tagName: 'a', attribs: { href: attribs.href, name: attribs.name, target: '_blank' } };
|
attribs.target = '_blank';
|
||||||
}
|
}
|
||||||
|
return attribs;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user