Open Bug 674625 Opened 13 years ago Updated 4 years ago

Rich Text Editor Modifies Hyperlink To Be Relative With Wrong Number Of ../

Categories

(Core :: DOM: Editor, defect, P5)

5 Branch
All
Other
defect

Tracking

()

UNCONFIRMED

People

(Reporter: cas5542, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110615151330 Steps to reproduce: When copying rendered html into a rich text editor, in html mode, hyperlink URL's are made relative. The problem is the number of ../ in the new url is incorrect. Actual results: The base application URL is http://localhost:8080/foo So for example if I paste a link pointing to http://localhost:8080/foo/bar/index.html it gets changed into ../../../bar/index.html which in absolute terms points to http://localhost:8080/bar/index.html Expected results: I would expect http://localhost:8080/foo/bar/index.html to be made into ../../../foo/bar/index.html
Makes me think of bug 430910.
Component: General → Editor
Product: Firefox → Core
QA Contact: general → editor
(In reply to comment #1) > Makes me think of bug 430910. I had thought that it was originally a dup of bug 430910, but if you look at the line 2.11 in the test cases link in the last comment (http://hg.mozilla.org/mozilla-central/rev/4f09e912977d) I believe this is the expected result.
Do you get the same problem when the URL doesn't have a port number in it?
Yes the same problem occurs. I did notice something interesting though. Regardless of what page I reference I still get the same amount of leading ../. So if I were to do http://localhost:8080/foo/index.html I would still get ../../../index.html. Is the URL made relative from the spot of the rich text editor? If so that does not make much sense in my particular use case because the rich text editor is not in the same directory where the content gets displayed.

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.