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

Fixed Normal links converted to hyperlink if URL is edited

AndyB

Well-known member
#1
When I paste into a message a link like this:

Code:
https://www.google.com/
when I save the message it saves it properly as:

Code:
[URL]https://www.google.com/[/URL]
The bug occurs if I edit the message and I update the URL using the rich text editor, immediately after I make a change of the URL, the link becomes a hyperlink. This is extremely confusing because the text portion of the hyperlink shows one thing and the URL will continue to be the original URL.

Please don't change normal links to hyperlinks if we edit a link. A hyperlink should only be created when we click the "Chain link icon" and create a hyperlink.

Thank you.
 

Mike

XenForo developer
Staff member
#2
They're both hyperlinks, but I understand what you're trying to get at: if the text and the link are the same and I update the link, the text should be updated as well for me. It will now do that to reduce confusion.

There is the other way, where the text is edited but the link is not. That's a particularly difficult issue to solve though as we don't know the intention when they edit the URL text: it could be to make it be something other than (or more than) the URL. As such, the link URL won't change in that case.
 

AndyB

Well-known member
#3
Hi Mike,

Sorry I don't know the correct terminology to differentiate between the two types of hyperlinks.

(hyperlink without text)
Code:
[URL]http://www.google.com/[/URL]
(hyperlink with text)
Code:
[URL='http://www.google.com/']http://www.google.com/[/URL]
I assume you have not rolled out the fix, as the bug still occurs.

Just to reiterate, please make sure that if we create a (hyperlink without text), that it remains a (hyperlink without text) and that editing the hyperlink does not convert it to a (hyperlink with text).

Thank you.
 
Last edited:

AndyB

Well-known member
#5
Hi Mike,

The original issue remains. Here are the steps to reproduce the bug:

1) In the quick reply box type the following: http://www.google.com

2) Post Reply

at this point we have a new post which has a link.

3) Edit post, switch to BB Code Editor

at this point we can verify the link looks like this:

(example of hyperlink without text)
Code:
[URL]http://www.google.com[/URL]
4) Switch to Rich Editor mode.

5) Edit the hyperlink, for example type a "2" after google:

(this is what is visible in the editor)
Code:
http://www.google2.com
6) Switch to BB Code editor.

7) Notice the XenForo software has changed the hyperlink without text to a hyperlink with text.

(example of hyperlink with text)
Code:
[URL='http://www.google.com']http://www.google2.com[/URL]
Mike, what I would like to see is that a hyperlink without text always remain that way even if edited. The XF code should never change a hyperlink without text to a hyperlink with text.

Thank you.
 

Mike

XenForo developer
Staff member
#6
The 2 URL formats are equivalent to one another. The simple form is a short cut. There is no distinction otherwise.

You are changing the text of the URL. I specifically addressed this in my previous post:
There is the other way, where the text is edited but the link is not. That's a particularly difficult issue to solve though as we don't know the intention when they edit the URL text: it could be to make it be something other than (or more than) the URL. As such, the link URL won't change in that case.
I did change this but it's only possible to change it the other way around

When you edit the text like you're doing in a WYSIWYG editor, you're editing the visual side; you're specifically saying that you want the text to be changed. If you want to change the link target, you should be using the link button which will change the text if deemed appropriate.
 

AndyB

Well-known member
#7
It would be great if the simple form hyperlink would not be changed to the advanced hyperlink when editing in WYSIWYG editor. Would that be possible?