Match urls between grave `

CCBUG: 455166
FIXED-IN: 22.08
wilder
Ahmad Samir 4 years ago committed by Kurt Hindenburg
parent 7522686088
commit 651bcfb733
  1. 3
      src/autotests/HotSpotFilterTest.cpp
  2. 2
      src/filterHotSpots/UrlFilter.cpp

@ -43,6 +43,9 @@ void HotSpotFilterTest::testUrlFilterRegex_data()
QTest::newRow("quote_before") << "\"http://www.ietf.org/rfc/rfc2396.txt"
<< "http://www.ietf.org/rfc/rfc2396.txt" << true;
QTest::newRow("grave_before") << "`https://foo.bar`"
<< "https://foo.bar" << true;
QTest::newRow("file_scheme") << "file:///some/file"
<< "file:///some/file" << true;

@ -38,7 +38,7 @@ using namespace Konsole;
// scheme://
// - Must start with an ASCII letter, preceeded by any non-word character,
// so "http" but not "mhttp"
static const char scheme_or_www[] = "(?<=^|[\\s\\[\\]()'\"])(?:www\\.|[a-z][a-z0-9+\\-.]*+://";
static const char scheme_or_www[] = "(?<=^|[\\s\\[\\]()'\"`])(?:www\\.|[a-z][a-z0-9+\\-.]*+://";
static const char scheme_or_www_end[] = ")";
// unreserved / pct-encoded / sub-delims

Loading…
Cancel
Save