• Welcome to Simple Machines Community Forum. Please login or sign up.
December 07, 2021, 06:03:26 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


Posted url is truncated

Started by Sir Osis of Liver, August 03, 2017, 05:52:34 PM

Previous topic - Next topic

Sir Osis of Liver

Noticed this once before, and it's happened again.  If a url ending with parentheses is added to a post, the last character is not included in the link, and link fails.  Like this -

  https://en.wikipedia.org/wiki/Bayan_(accordion)

Easier to see in this screenshot -


"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Arantor

This is actually by design.

The problem is if you put a link in brackets, e.g. I'm talking about a website (http://example.com/)

Now, fixing the bracket breaks *that* link.
No good deed goes unpunished
All helpful urges should be circumvented

Sir Osis of Liver

That would mean you'd have to look for an open bracket inside the url or before the url, to decide how to handle the closing bracket.  I've only ever seen this at wikipedia, but it's fairly common there.

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

efk

I saw it many times on gaming forums, related with stats page, nicks with that kind of symbols at nicks end will be problematic when linking to the forum. Solution is to double place it under bbc url, or the way I like more, to double click on unclickable end of the link and to mark full link and to open in new tab.
Examples:

http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=^propalica^
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=haywire.
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=god..of..war
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=.t.n.t.
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=[bloodthirst]
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=[wog]ballack.13
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=techni[c4l]
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=undead][rox
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=^k.
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=doiwannaknow..
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=wearepathetic-


Same goes for : then , etc

Also we had many times problems when users used symbols like [ ] and something inside, so some weird things were displayed in topics, but that was easily fixed with insert code.


Arantor

Quote from: Sir Osis of Liver on August 03, 2017, 06:38:37 PM
That would mean you'd have to look for an open bracket inside the url or before the url, to decide how to handle the closing bracket.  I've only ever seen this at wikipedia, but it's fairly common there.

And doing that is insanely difficult with regular expressions. It is possible but it actually requires so much more effort to do at the regex level, we found it could actually bring the site down if enough people made posts with URLs.
No good deed goes unpunished
All helpful urges should be circumvented

Arantor

Quote from: efk on August 03, 2017, 07:26:10 PM
I saw it many times on gaming forums, related with stats page, nicks with that kind of symbols at nicks end will be problematic when linking to the forum. Solution is to double place it under bbc url, or the way I like more, to double click on unclickable end of the link and to mark full link and to open in new tab.
Examples:

http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=^propalica^
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=haywire.
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=god..of..war
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=.t.n.t.
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=[bloodthirst]
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=[wog]ballack.13
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=techni[c4l]
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=undead][rox
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=^k.
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=doiwannaknow..
http://dota.eurobattle.net/la/forum/index.php?action=gameinfo;sa=player;sid=1;nick=wearepathetic-


Same goes for : then , etc

Also we had many times problems when users used symbols like [ ] and something inside, so some weird things were displayed in topics, but that was easily fixed with insert code.



[ and ] are problematic on a fundamental level because they're literally parts of bbcode itself as well. As for a lot of the characters there, technically things like ^ shouldn't be parts of URLs anyway...
No good deed goes unpunished
All helpful urges should be circumvented

Sir Osis of Liver

Eh, no big deal to use [url][/url] tags.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Arantor

For cases like (), sure, but for the extended case of [] it's a huge deal ;)
No good deed goes unpunished
All helpful urges should be circumvented

Advertisement: