Closed Bug 220581 Opened 22 years ago Closed 22 years ago

Bookmarks manager - problem interpreting ampersands in imported bookmarks

Categories

(Firefox :: Bookmarks & History, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Waldo, Assigned: p_ch)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20030926 Firebird/0.7+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20030926 Firebird/0.7+ Whenever I delete my Firebird main and profile folders and reinstall Firebird, I have to import my old bookmarks to be able to access them. When this happens, it appears Firebird wants to edit my bookmarks.html file and replace all & that are not followed by character entity codes with & to make the code more valid. For example this: http://forums.devshed.com/forumdisplay.php?s=&forumid=5 would be converted to this: http://forums.devshed.com/forumdisplay.php?s=&forumid=5 The problem comes when I try to open these bookmarks. For some reason the & is not parsed out of the URL into a & and the second URL of above is sent through. This often breaks the CGI scripts the query string is sent to. Reproducible: Always Steps to Reproduce: 1. On a clean install, import a bookmarks.html file with a bookmark whose URL contains an ampersand. 2. Open the bookmark. Actual Results: The location bar shows the original URL with all "&" replaced by "&". Expected Results: The location bar should show the original unadulterated URL with all "&" still intact. It's worth noting this is only a problem with bookmarks and not hyperlinks in downloaded files.
.
Product: Browser → Firebird
QA Contact: petersen → mpconnor
Version: Trunk → unspecified
can you please attach a reduced version of the old bookmarks file you are importing to use for testing?
Testcase consists in its entirety of this line: <A HREF="http://www.google.com/search?&amp;q=firebird">Bookmark</A> The &amp; is not converted into a & in the URL, so the URL loaded is actually <http://www.google.com/search?&amp;q=firebird> (with &amp; not changed into &). The actual URL loaded should be <http://www.google.com/search?&q=firebird> (which does work as intended). Tested using completely new setup (deled old install directory, both Mozilla and Phoenix directories in my appdata directory on WinXP) of latest Firebird 0.8 branch nightly: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031217 Firebird/0.7+
See also bug 223762, which deals with a similar problem. That bug mentions that because the charset is UTF-8, HTML entities shouldn't be necessary. It then goes on to say that because the file is text/html, HTML entities should probably be used. This obviously creates a conflict. Is a "&" an entity beginner or just a regular character? This begets the question: is it possible the code is being interpreted as UTF-8 only? If it is, perhaps "&amp;" isn't being recognized as such because of the charset, which causes "&" to be interpreted literally and not as the beginning of an entity?
Adding testcase keyword, tweaking summary, changing to NEW. I'll give this a test again later today to see if it still exists, as it's been a few weeks since I last tried it out.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Summary: Bookmarks manager - problem interpreting ampersand when you import bookmarks → Bookmarks manager - problem interpreting ampersands in imported bookmarks
Sorry about not rechecking this earlier, but it went off my internal radar. A check using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040120 Firebird/0.7+ ...still shows it in existence. When the imported bookmark is run, the HTML entity for the ampersand is not converted into a real ampersand.
I can't reproduce this behavior any more. -->WFM
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: