id summary reporter owner description type status priority milestone component version resolution keywords cc
5961 Link text not updated when url changes kinfora "''I'm not sure if I should open a new bug for this or simply reopen #4612 - I'm filing a new bug so admins can make that call. Feel free to close this and reopen 4612''
CKEditor link plugin has feature where upon changing a link's URL, it checks to see if the old link text was equal to the old link href. If the two are (were) equal, the link text is also changed to reflect the new URL. The idea being that you don't end up with confusing links like http://yahoo.com/
This feature does not work on firefox 3.6.x if the link in question is the last piece of text in its paragraph.
I tracked the problem to /plugins/link/dialog/link.js onOk function, where the old link text is read with ""textView = element.getHtml();"". On firefox the string returned by element.getHtml() includes an extra trailing '
', causing the comparinson to result in false.
The easiest fix would be to change element.getHtml() to element.getHtml().replace(""
"", """"), but you probably want do something to getHtml instead as the extra linebreaks are likely to cause other problems as well.
This bug is likely related to #5293 which also is about firefox adding extra linebreaks.
" Bug closed Normal General 3.3.1 fixed Gecko