Closed Bug 267020 Opened 20 years ago Closed 12 years ago

Newline (%0A) in bookmark causes it to become blank when restarted

Categories

(SeaMonkey :: Bookmarks & History, defect)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: sstein, Unassigned)

Details

(Whiteboard: [2012 Fall Equinox])

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040918
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040918

Creating a bookmark using File Bookmark (shift+ctrl+D) containing a
newline works as expected.  You can visit the bookmark and have it work.
However, after restarting the browser, the bookmarks become blank
(name=="", destination=="")

Note: This was found while playing with bookmarklets.
      Some of the scripts were many lines long.

Mozilla 1.7.3
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040918

Reproducible: Always
Steps to Reproduce:
1. Create bookmark to somewhere such as:
blank
line
=="blank\nline"

2.Quit Mozilla
3.Start Mozilla
4.Look for bookmark
Actual Results:  
Bookmark name and destination are now the empty string.

Expected Results:  
Bookmark retains old contents.
Product: Browser → Seamonkey
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug is still present in Mozilla 1.7.11.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050918
When the bookmark is created, it works and shows a
[V ] character where the newline is,
[ T]
but the bookmark is lost on browser restart.
Reassigning as per Bug #32644
Assignee: p_ch → nobody
Are you getting a true newline into the bookmark URI?  If I enter "%0A" it stays as "%0A" and everything is fine (although it confused the webserver).  If I actually edit the bookmarks.html file and put a newline in, I get the effect described here.  The code that reads the bookmarks file expects each bookmark to be on a single line.  A URI with a true newline is invalid anyway.
If it is not allowed, then it shouldn't allow me to put a newline
into the URL bar, or automatically change it to a %0A like it
does for spaces.  However, all of Mozilla's widgets for single
line text fields, including the URL bar seem to allow 
newlines to be entered by cutting and pasting (CTRL+C,
then CTRL+V).  (Maybe this should also be fixed?)
Going to such a URL in 1.7.12 seems to just eat the newline,
which I guess is a decent way to handle it, but escaping is
probably a better idea.

I didn't manually edit the bookmarks file.  I only went to the URL
using the URL bar and then bookmarked it.
OK, the URL bar itself won't allow newlines anymore (bug 23485)
We need to do the same thing in other places where a URL can be entered (new bookmark dialog, bookmark properties dialog, open web location dialog, etc)
Status: UNCONFIRMED → NEW
Ever confirmed: true
I also experienced this bug.  I encountered it by pasting (probably middle-click) a multiline javascript: bookmarklet into the New Bookmark / 'properties for <bookmark name>' window.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070601 Ubuntu/dapper-security Firefox/1.5.0.12
New line characters now stripped on paste, closing this as WFM
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/18.0 Firefox/18.0 SeaMonkey/2.15a1
Build identifier: 20120921003032
Whiteboard: [2012 Fall Equinox]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.