diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-07-09 13:26:01 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-07-09 13:26:01 +0200 |
commit | 7650e6ced60aad073d5c5f4bf64b34be0655759f (patch) | |
tree | c2ccc06e801dae7d514420ceddde8e6a776e8f97 /src/Config.h | |
parent | Open url using QDesktopServices from Qml (diff) | |
download | nheko-7650e6ced60aad073d5c5f4bf64b34be0655759f.tar.xz |
Fix autolinking breaking on single quotes in href attribute
Fixes #234
Diffstat (limited to '')
-rw-r--r-- | src/Config.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Config.h b/src/Config.h index f99cf36b..c0624709 100644 --- a/src/Config.h +++ b/src/Config.h @@ -53,9 +53,9 @@ namespace strings { const QString url_html = "<a href=\"\\1\">\\1</a>"; const QRegularExpression url_regex( // match an URL, that is not quoted, i.e. - // vvvvvv match quote via negative lookahead/lookbehind vv - // vvvv atomic match url -> fail if there is a " before or after vvv - R"((?<!")(?>((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!"))"); + // vvvvvv match quote via negative lookahead/lookbehind vv + // vvvv atomic match url -> fail if there is a " before or after vvv + R"((?<!["'])(?>((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!["']))"); } // Window geometry. |