actually, only intercept URLs which are explicitly referring to our current app
This commit is contained in:
parent
1aed9ccbf4
commit
d54a75c913
2 changed files with 10 additions and 8 deletions
|
@ -47,10 +47,9 @@ var sanitizeHtmlParams = {
|
|||
transformTags: { // custom to matrix
|
||||
// add blank targets to all hyperlinks except vector URLs
|
||||
'a': function(tagName, attribs) {
|
||||
// XXX: use matrix.to instead and deduplicate regexp with linkify-matrix.js
|
||||
var m = attribs.href.match(linkifyMatrix.VECTOR_URL_PATTERN);
|
||||
if (m) {
|
||||
return { tagName: 'a', attribs: { href: m[4] } };
|
||||
return { tagName: 'a', attribs: { href: attribs.href } };
|
||||
}
|
||||
else {
|
||||
return { tagName: 'a', attribs: { href: attribs.href, target: '_blank'} };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue