From 0a7090dd64a5d648d371281d09a924d11ad82945 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 9 Sep 2020 14:35:17 -0600 Subject: [PATCH] Account for via in pill matching regex Fixes https://github.com/vector-im/element-web/issues/15133 Regression first appeared in a80bcaa292addfc04eb895a3f371e540b3e02c91 This also affects room IDs. --- src/components/views/elements/Pill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index 8247225a2b..3094f17fb7 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -29,7 +29,7 @@ import {Action} from "../../../dispatcher/actions"; // For URLs of matrix.to links in the timeline which have been reformatted by // HttpUtils transformTags to relative links. This excludes event URLs (with `[^\/]*`) -const REGEX_LOCAL_PERMALINK = /^#\/(?:user|room|group)\/(([#!@+])[^/]*)$/; +const REGEX_LOCAL_PERMALINK = /^#\/(?:user|room|group)\/(([#!@+]).*?)(?=\/|\?|$)/; class Pill extends React.Component { static isPillUrl(url) {