summary refs log tree commit diff
path: root/src/Config.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-07-20 13:52:13 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-07-20 14:05:10 +0200
commit0ad74590d4b7d91189a08d2278aaa6093d0a7e22 (patch)
tree86b4678bfb1d27d1346ef0bdfa419bce8fba4721 /src/Config.h
parentMerge pull request #1121 from MayeulC/32bit (diff)
downloadnheko-0ad74590d4b7d91189a08d2278aaa6093d0a7e22.tar.xz
Fix matrix.to link escaping
Properly escapes in replies and with unmatched [].

fixes #854
Diffstat (limited to 'src/Config.h')
-rw-r--r--src/Config.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Config.h b/src/Config.h
index 72521f20..5a742337 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -30,9 +30,7 @@ const QRegularExpression url_regex(
   //          vvvv atomic match url -> fail if there is a " before or after        vvv
   QStringLiteral(
     R"((?<!["'])(?>((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!["']))"));
-// match any markdown matrix.to link. Capture group 1 is the link name, group 2 is the target.
-static const QRegularExpression
-  matrixToMarkdownLink(QStringLiteral(R"(\[(.*?)(?<!\\)\]\((https://matrix.to/#/.*?\)))"));
+// A matrix link to be converted back to markdown
 static const QRegularExpression
   matrixToLink(QStringLiteral(R"(<a href=\"(https://matrix.to/#/.*?)\">(.*?)</a>)"));
 }