зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1263628 - Ignore fragments when comparing URLs during reader view caching r=gijs
This seems to be a common issue with medium.com articles, but affects any page which was opened using a fragment in the URL (e.g. foo.com/bar#baz is the same page as foo.com/bar, however our reader view caching code didn't recognise the former as being equivalent to the latter). MozReview-Commit-ID: BtRmHq3sD9z --HG-- extra : rebase_source : ac96a0a5e09c2cc60644a23cdbe8e72e94c1fcc9 extra : amend_source : 37d603820880ce751dbf571da49bbf8dcd7e6d03 extra : source : 7977a317cba8dbd983ac2988d346e01887f94a14
This commit is contained in:
Родитель
f099c53749
Коммит
45f826fa31
|
@ -238,10 +238,10 @@ this.ReaderMode = {
|
|||
// Convert these to real URIs to make sure the escaping (or lack
|
||||
// thereof) is identical:
|
||||
try {
|
||||
responseURL = Services.io.newURI(responseURL, null, null).spec;
|
||||
responseURL = Services.io.newURI(responseURL, null, null).specIgnoringRef;
|
||||
} catch (ex) { /* Ignore errors - we'll use what we had before */ }
|
||||
try {
|
||||
givenURL = Services.io.newURI(givenURL, null, null).spec;
|
||||
givenURL = Services.io.newURI(givenURL, null, null).specIgnoringRef;
|
||||
} catch (ex) { /* Ignore errors - we'll use what we had before */ }
|
||||
|
||||
if (responseURL != givenURL) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче