Handle encoded matrix urls

Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>
This commit is contained in:
Jaiwanth 2021-04-22 16:53:20 +05:30
parent c0f8098a86
commit f2d0a56c1f
2 changed files with 4 additions and 4 deletions

View file

@ -255,7 +255,7 @@ matrixLinkify.options = {
target: function(href, type) {
if (type === 'url') {
const transformed = tryTransformPermalinkToLocalHref(href);
if (transformed !== href || href.match(matrixLinkify.ELEMENT_URL_PATTERN)) {
if (transformed !== href || decodeURIComponent(href).match(matrixLinkify.ELEMENT_URL_PATTERN)) {
return null;
} else {
return '_blank';