Account for via in pill matching regex

Fixes https://github.com/vector-im/element-web/issues/15133

Regression first appeared in a80bcaa292

This also affects room IDs.
pull/21833/head
Travis Ralston 2020-09-09 14:35:17 -06:00
parent 91282e8071
commit 0a7090dd64
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ import {Action} from "../../../dispatcher/actions";
// For URLs of matrix.to links in the timeline which have been reformatted by // For URLs of matrix.to links in the timeline which have been reformatted by
// HttpUtils transformTags to relative links. This excludes event URLs (with `[^\/]*`) // 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 { class Pill extends React.Component {
static isPillUrl(url) { static isPillUrl(url) {