• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Adding link below exsisting link problem

AndyB

Well-known member
#1
When I edit a post to add a link, if I paste the link below an existing link, the URL of the existing link is used.

Steps to reproduce:

1) Create a new post
2) Paste this -> http://xenforo.com/community/
3) Save the post
4) Edit the post
5) Paste this -> https://www.google.com/
6) Save the post

You will see the text for the second link will be for Google, but clicking on the link will go to Xenforo.

I'm using Firefox on OS X.
 

md_5

Well-known member
#4
When I edit a post to add a link, if I paste the link below an existing link, the URL of the existing link is used.

Steps to reproduce:

1) Create a new post
2) Paste this -> http://xenforo.com/community/
3) Save the post
4) Edit the post
5) Paste this -> https://www.google.com/
6) Save the post

You will see the text for the second link will be for Google, but clicking on the link will go to Xenforo.

I'm using Firefox on OS X.
What XenForo version? I think TinyMCE in Xenforo 1.0, 1.1 did this. I just tested in XenForo 1.2 here, no issues.
 

Moshe1010

Well-known member
#5
I've tried to replicate this with Firefox 26, Chrome 32, and the latest Safari on OS X 10.9.1, but I failed to do that. I can't reproduce this.
 

Moshe1010

Well-known member
#7
OK, Andy and I were able to reproduce it. The links should be copied from the actual address bar when the two websites are open at 2 different tabs and not from the messages here. It does that only with FF 26 OS X.
 

CTXMedia

Formerly CyclingTribe
#9
Confirmed - Win 7 - FF 26:

upload_2014-1-28_12-4-7.png

Steps I took:
  • Pasted the text for the first link and posted.
  • Copied the text for the second link.
  • Edited the post, clicked in the editor window, and the cursor was placed at the very end of the first link.
  • Pressed RETURN to put the cursor on the second line.
  • Pasted the text of the second link and saved changes.

It appears the closing URL tag is being wrapped to the right-side of the cursor and in pressing RETURN the original link is being extended to the second line.
 

Mike

XenForo developer
Staff member
#10
I confirmed this yesterday as well. It seems as if the browser is getting confused when the <a> tag is created and it connects to the previous one.
 

Mike

XenForo developer
Staff member
#11
I've added a workaround for this in 1.3. Firefox actually maintains the link when pressing enter, though we immediately unlink it which appears to fix it when you type, but it doesn't actually remove the link until a key is typed, so pasting maintains the link. I've adjusted this to actively remove the link.