Closed Bug 1151205 Opened 9 years ago Closed 9 years ago

Unexpected rendering failures for MSN articles

Categories

(Firefox Graveyard :: Reading List, defect)

38 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1147337

People

(Reporter: NiKo, Unassigned)

Details

Ref https://github.com/mozilla/readability/issues/98#issuecomment-89582020

Reader fails at rendering a readable version of this URL: http://www.msn.com/en-us/tv/reviews/tv-review-%E2%80%98marvel%E2%80%99s-daredevil%E2%80%99/ar-AAaj1RV?ocid=ansHollywoodReporter11

Error message: Failed to load article from page

This URL have unsupported characters in its url; the load failure we encounter seems to happen in `AboutReader.jsm`, in `_loadArticle` when the current url is compared against the article.url property.

`url` is:

```
http://www.msn.com/en-us/tv/reviews/tv-review-‘marvel’s-daredevil’/ar-AAaj1RV?ocid=ansHollywoodReporter11
```

While `article.url` is:

```
http://www.msn.com/en-us/tv/reviews/tv-review-%E2%80%98marvel%E2%80%99s-daredevil%E2%80%99/ar-AAaj1RV?ocid=ansHollywoodReporter11
```

So as they're detected being different, we miss the comparison check and render the failure message.
Note that this silly fix solves the issue:

diff --git a/toolkit/components/reader/AboutReader.jsm b/toolkit/components/reader/AboutReader.jsm
index 271ab6c..d3861be 100644
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -604,7 +604,7 @@ AboutReader.prototype = {
       return;
     }
 
-    if (article && article.url == url) {
+    if (article && unescape(article.url == url)) {
       this._showContent(article);
     } else if (this._articlePromise) {
       // If we were promised an article, show an error message if there's a failure.

Though I suspect this could break other sites, and that we don't really want to use unescape. I'm wondering why do we actually check for the url equality… If it appears we could live without this check, we could simply drop it as well.
This is actually a duplicate of Bug 1147337.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.