diff --git a/src/autotests/HotSpotFilterTest.cpp b/src/autotests/HotSpotFilterTest.cpp index 45184957..691d7af5 100644 --- a/src/autotests/HotSpotFilterTest.cpp +++ b/src/autotests/HotSpotFilterTest.cpp @@ -60,17 +60,17 @@ void HotSpotFilterTest::testUrlFilterRegex_data() << "https://example.com/foo,bar" << true; QTest::newRow("empty_query") << "http://example.com/?" - << "http://example.com" << true; + << "http://example.com/" << true; QTest::newRow("empty_fragment") << "http://example.com/#" - << "http://example.com" << true; + << "http://example.com/" << true; QTest::newRow("www_followed_by_colon") << "www.example.com:foo@bar.com" << "www.example.com" << true; QTest::newRow("ipv6") << "http://[2a00:1450:4001:829::200e]/" - << "http://[2a00:1450:4001:829::200e]" << true; + << "http://[2a00:1450:4001:829::200e]/" << true; QTest::newRow("ipv6_with_port") << "http://[2a00:1450:4001:829::200e]:80/" - << "http://[2a00:1450:4001:829::200e]:80" << true; + << "http://[2a00:1450:4001:829::200e]:80/" << true; } void HotSpotFilterTest::testUrlFilterRegex() diff --git a/src/filterHotSpots/UrlFilter.cpp b/src/filterHotSpots/UrlFilter.cpp index 940b33b5..48b43a88 100644 --- a/src/filterHotSpots/UrlFilter.cpp +++ b/src/filterHotSpots/UrlFilter.cpp @@ -51,7 +51,7 @@ static const char host[] = "(?:[" COMMON_1 "]++|" IPv6_literal ")?+"; // www.foo static const char port[] = "(?::[0-9]+)?+"; // :1234 #define COMMON_2 "a-z0-9\\-._~%!$&'()*+,;=:@/" -static const char path[] = "(?:/[" COMMON_2 "]+)?+"; // /path/to/some/place +static const char path[] = "(?:/[" COMMON_2 "]*+)?+"; // /path/to/some/place static const char query[] = "(?:\\?[" COMMON_2 "]+)?+"; // "?somequery=bar" static const char fragment[] = "(?:#[" COMMON_2 "]+)?+"; // "#fragment"