1
Ticket #16912
Status: Closed
Opened by Low-power
- Finished
Type:
Bug Report
Views:
206
Access:
Public
Opened:
4/2/22 2:30 am 4/2/22 2:30 am
Updated:
4/7/22 3:19 pm 4/7/22 3:19 pm

URLs are inappropriately transformed in the code block

I would expect anything in a [​code] block will be displayed as-is, without any sort of style and syntax transformation.

But I found URLs (at least HTTPS URLs) are transformed even inside a code block, for example:
[​code]$ git clone h​t​t​p​s​:​//git.code.sf.net/p/nbtfsutils/code.git nbtfsutils[​/code]
would be displayed as:
$ git clone https://git.code.sf.net/p/nbtfsutils/code.git nbtfsutils

Note that URL has being transformed as a hyperlink, with 'h​t​t​p​s​:​//' part stripped; which is absolutely wrong here!

Edit:
Looks like the issue is even affecting I editing this ticket...
I have to insert the unicode zero width space (0x200b) characters into the URL to workaround it for this ticket only; this is not an option for the use case above, because users would copy-pasting the above command line, and the command will not working with this special characters inserted.

Create an account or sign in to comment.

1
04/07/2022 3:19 pm
Level 88 : Elite Scapegoat
Paril
Paril's Avatar
set status to Closed, set resolution to Finished.
1
04/07/2022 3:18 pm
Level 88 : Elite Scapegoat
Paril
Paril's Avatar
This should be fixed now; code blocks (and anchors) won't try to linkify their contents.

$ git clone https://git.code.sf.net/p/nbtfsutils/code.git nbtfsutils
1
04/04/2022 3:52 pm
Level 88 : Elite Scapegoat
Paril
Paril's Avatar
set status to In Progress.
1
04/04/2022 3:52 pm
Level 88 : Elite Scapegoat
Paril
Paril's Avatar
Yeah, we can fix this. In the database it's actually recorded as the above text you've shown, but when we parse it to be displayed on the server side we transform URLs in textual nodes to be clickable. We'll fix this so it doesn't happen inside of code/pre blocks.
1
04/04/2022 3:48 pm
Level 71 : Legendary Cyborg
Cyprezz
Cyprezz's Avatar
set status to Accepted, assigned Developers/Administrators.
1
04/02/2022 2:46 am
Level 37 : Artisan Miner
Low-power
Low-power's Avatar
modified ticket description.
1
04/02/2022 2:41 am
Level 37 : Artisan Miner
Low-power
Low-power's Avatar
modified ticket description.
1
04/02/2022 2:37 am
Level 37 : Artisan Miner
Low-power
Low-power's Avatar
modified ticket description.
1
04/02/2022 2:33 am
Level 37 : Artisan Miner
Low-power
Low-power's Avatar
modified ticket description.
1
04/02/2022 2:32 am
Level 37 : Artisan Miner
Low-power
Low-power's Avatar
modified ticket description.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome