From: Kevin Decherf Date: Mon, 22 Oct 2018 21:08:58 +0000 (+0200) Subject: updateOriginUrl: add behavior when diff is fragment and query X-Git-Tag: 2.3.4~8^2~5 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=fc040c749dec0275e562182562c1c1cb89e6cfa1;p=github%2Fwallabag%2Fwallabag.git updateOriginUrl: add behavior when diff is fragment and query Signed-off-by: Kevin Decherf --- diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 007ee8bb..1a2a330f 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -344,6 +344,7 @@ class ContentProxy break; case ['fragment']: case ['query']: + case ['fragment', 'query']: // noop break; default: diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php index c20732cc..3debc457 100644 --- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php +++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php @@ -801,6 +801,14 @@ class ContentProxyTest extends TestCase null, 'example.org', ], + 'fragment and query string in fetched content' => [ + 'https://example.org/hello', + null, + 'https://example.org/hello?foo#world', + 'https://example.org/hello', + null, + 'example.org', + ] ]; }