]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
updateOriginUrl: add behavior when diff is fragment and query
authorKevin Decherf <kevin@kdecherf.com>
Mon, 22 Oct 2018 21:08:58 +0000 (23:08 +0200)
committerKevin Decherf <kevin@kdecherf.com>
Mon, 22 Oct 2018 21:08:58 +0000 (23:08 +0200)
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
src/Wallabag/CoreBundle/Helper/ContentProxy.php
tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php

index 007ee8bbe9cb8fd8049ec830836532e0e9c1fbee..1a2a330ff085f5e922da295fbd5c908611936545 100644 (file)
@@ -344,6 +344,7 @@ class ContentProxy
                     break;
                 case ['fragment']:
                 case ['query']:
+                case ['fragment', 'query']:
                     // noop
                     break;
                 default:
index c20732cc2480a07b52f80c6fbc799d0bc6b75f1a..3debc4577fd793c1dd23a4919ecc453058db1e8b 100644 (file)
@@ -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',
+            ]
         ];
     }