Fixed Replacing link with another link problem


Well-known member
Steps to reproduce:

1) Create post with a link
2) Go to some other tab
3) Highlight URL
4) Copy URL to clipboard
5) Go back to tab with post
6) Edit post
7) Highlight link
8) Paste link from clipboard
9) Save

You will see the new link shows the correct URL but when you click the link it takes you to the old URL.

Using OS X with Firefox.

Chris D

XenForo developer
Staff member
This is pretty much the expected behaviour, (I think).

I suspect what is happening is the URL is parsed like this: [URL=''][/URL]. So when you then edit that in the text editor, the end result is this: [URL=''][/URL]

Could you verify what the BB Code is after the post has been edited? I imagine it would resemble the above.


XenForo developer
Staff member
What Chris has explained is the behavior. Whether or not it's totally expected is definitely debatable - it depends on whether you consider the selection to be inside or out of the wholly selected tags.

I'm experimenting with a change here though that attempts to select as much as possible when replacing content (via a paste).