Author Topic: URL Tag Not Working With Square Brackets in URLs  (Read 710 times)
joseph_125
Hero Member
*****
Offline

Gender: Male
View Posts
View Gallery


GoL
URL Tag Not Working With Square Brackets in URLs « on: February 13, 2021, 11:25:55 PM » Author: joseph_125
I don't know if anyone else have has this problem in the past but I've noticed that the url tag on here dosen't parse URLs with square brackets in the URL correctly. For reference, here's a comment I made that has a link to a URL with a square bracket that didn't get parsed correctly.

Anyone else here have this problem or is willing to try and see if they can replicate this issue?
Logged
High Intensity
Sr. Member
****
Offline

View Posts
View Gallery

Re: URL Tag Not Working With Square Brackets in URLs « Reply #1 on: February 14, 2021, 12:42:36 AM » Author: High Intensity
It appears that, because the URL had square brackets in it, the software saw those brackets and did not know what you were doing, so it spat it out as plain text.

So what it should have seen was: (Red = URL, Blue = Code, Black = Text)

{url=http://demarcat.eu/PAGINAS%20DEFINITIVAS/documentos/hid-troubleshooting-guide[1].pdf]See here[/url]

But what it probably saw was:

{url=http://demarcat.eu/PAGINAS%20DEFINITIVAS/documentos/hid-troubleshooting-guide[1].pdf]See here[/url]

Now I think if this site supported HTML hyperlinks, then that could be used as a workaround (they're just slightly trickier to memorize), but they don't appear to be supported here, but since this issue doesn't appear to be too common, I doubt any effort to implement a fix or workaround will occur.
Logged
joseph_125
Hero Member
*****
Offline

Gender: Male
View Posts
View Gallery


GoL
Re: URL Tag Not Working With Square Brackets in URLs « Reply #2 on: February 14, 2021, 12:53:46 AM » Author: joseph_125
Yeah I think that's it. Anyway I have discovered a workaround, if you replace the [ in the URL with %5B and ] with %5D, the URL will still function correctly and the software on LG will parse the bbcode correctly.

Using my earlier example the corrected bbcode would look like this

Code: [Select]
[url=http://demarcat.eu/PAGINAS%20DEFINITIVAS/documentos/hid-troubleshooting-guide%5B1%5D.pdf]See here[/url]
Which would get correctly rendered as this:

See here

Instead of this broken URL is you didn't replace the [ and ]:

.pdf]See here
Logged
Print 
© 2005-2021 Lighting-Gallery.net | SMF 2.0.18 | SMF © 2021, Simple Machines