Closed Bug 263513 Opened 20 years ago Closed 6 years ago

live bookmarks items should strip html markup from titles

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
minor

Tracking

()

RESOLVED INACTIVE

People

(Reporter: dan.j.allen, Unassigned)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10

If there is html markup in a title of an RSS entry, that html markup should be
stripped before displaying it in the live bookmark menu.  Other RSS aggregators
behave in this manner.

Reproducible: Always
Steps to Reproduce:
1. Create an RSS entry with html markup in the title
2. View the live bookmark entries for that site
3. See that the html tags in the title are shown in the text



Expected Results:  
Strip the html tags so that the title can be read without markup
example please (attachement)
One of the classic RSS problems: the spec is silent about whether the content
model for title is text/html or text/plain, leading to much wailing and
gnashing of teeth. Note that while stripping HTML from the first item improves
things for us, stripping it from the second loses data.
Atom at least makes it explicit, though we don't currently deal well with
inline XML in mode="xml", either.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: vladimir → vladimir+bm
Assignee: vladimir+bm → nobody
When solving the bug mentioned above, please also try to strip spaces like in this feed-example. This file is a modified copy of this feed: http://www.ad.nl/groenehart/?service=rss

Someone mentioned a problem with this feed at http://www.mozbrowser.nl/forum/viewtopic.php?p=40225 (in Dutch). The feed might not be convenient, but still Firefox should be able to nicely show the item titles in the Live Bookmark. The Sage-extension parses this feed nicely and so does Thunderbird 1.0.7.

Currently the Live Bookmark shows only these newline- and tab-characters and this makes it unusable. I guess it would be usable as a Live Bookmark when spaces, tabs and newline-characters would be trimmed from the title.
Sorry for the bugspam, but just wanted to mentioned that Thunderbird uses regular expressions in Javascript to get rid of characters like newlines, tabs, etc:
-----------------
// the subject may contain HTML entities.
// Convert these to their unencoded state. i.e. & becomes '&'
title = title.replace(/&lt;/g, '<');
title = title.replace(/&gt;/g, '>');
title = title.replace(/&quot;/g, '"');
title = title.replace(/&amp;/g, '&');

// Compress white space in the subject to make it look better.
title = title.replace(/[\t\r\n]+/g, " ");

this.title = this.mimeEncodeSubject(title, this.characterSet);
-----------------
See seamonkey/source/mail/extensions/newsblog/content/FeedItem.js
comment 4 is the much easier bug 253814, not this one.
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs, filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → bookmarks
This one is visible, annoying and looks simple to fix: either parse the ampersand-semicolon string, or strip it, if nothing else.
Summary: live bookmark item strip markup → live bookmarks items should strip html markup from titles
As far as I can tell, comment 2 makes this either a WONTFIX or an INVALID in the RSS 2.0 case. However, I think an improvement over stripping all tags in the RSS-Atom type="html" case could be that we white-list certain inline html tags (e.g. <s>, <b>, <i>) and allow those to be rendered. It certainly doesn't fix all cases, but seems like it would be an improvement.
No, comment 2 just means that because it is RSS, you absolutely cannot win, you just have to decide who to make look crappy or broken or who to make incomprehensible, with no spec guidance to back up your choice.

As to rendering some, *can* we? Feed preview certainly could, but this bug predates its existence, and is about live bookmarks, and I don't know that we have any support for making menuitems bold or italic or struck-through.
I was in-fact thinking about the feed preview, so I guess it should be a separate bug where it could and should do some rendering?
See Also: → 672462
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: