Closed
Bug 271045
Opened 21 years ago
Closed 21 years ago
Thunderbird rejects valid atom feeds
Categories
(MailNews Core :: Feed Reader, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: mrbkap, Assigned: mrbkap)
References
()
Details
Attachments
(1 file)
|
1.09 KB,
patch
|
mscott
:
review+
|
Details | Diff | Splinter Review |
The regular expressions used in determining the type of feed that Thunderbird
can possibly reject valid atom feeds (and also possibly RSS feeds).
In particular, in mozilla/mail/extensions/newsblog/content/Feed.js, starting on
line 188 uses regular expressions of the form: this.responseText.search(/="
The problem with this regular expression is that both apostrophes (') and quotes
(") can be used to denote attribute values in XML, so in the feed: <feed
xmlns='http://purl.org/atom/ns#'> the regular expression fails.
The easy fix for this would be to make the regular expressions use |["']| in
place of |"|, which would accept and parse all valid atom and RSS feeds (note
that the quotation mark at the end of the value can also be |'| or |"|.
I think a more robust fix would be to inspect the DOM of the incoming feed and
check to see if the first element is <feed> or <rss>. This would allow
not-quite-valid (since atom seems to require a namespace) feeds to be parsed
correctly; however, I'm not very familiar with this code, so I'm not certain of
the feasibility of this approach.
| Assignee | ||
Comment 1•21 years ago
|
||
Taking since I've now made a patch. This seems to work for me (but I hacked my
Thunderbird .9, so this is technically an untested patch, since I had to pull a
new copy of the file).
Assignee: mscott → mrbkap
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 167402 [details] [diff] [review]
patch v1
Looking for r=. Does this need sr=? If not, once it has r=, can it just be
checked in?
Attachment #167402 -
Flags: review?(mscott)
Comment 3•21 years ago
|
||
this is a very low risk fix with clear verification steps agains the livejournal
test feeds.
Target Milestone: --- → Thunderbird1.0
Updated•21 years ago
|
Attachment #167402 -
Flags: review?(mscott) → review+
Comment 4•21 years ago
|
||
fixed trunk and branch
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 5•21 years ago
|
||
Verified with Windows build 2004-12-03-06-0.9
the feed is added as expected
Status: RESOLVED → VERIFIED
Component: RSS → Feed Reader
Product: Thunderbird → MailNews Core
Target Milestone: Thunderbird1.0 → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•