Advertisement:

Author Topic: Posted url is truncated  (Read 2461 times)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Posted url is truncated
« on: August 03, 2017, 05:52:34 PM »
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 -

 

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,458
    • StoryBB/StoryBB on GitHub
Re: Posted url is truncated
« Reply #1 on: August 03, 2017, 06:27:31 PM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Posted url is truncated
« Reply #2 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.


Offline efk

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Male
Re: Posted url is truncated
« Reply #3 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.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,458
    • StoryBB/StoryBB on GitHub
Re: Posted url is truncated
« Reply #4 on: August 04, 2017, 12:50:52 AM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,458
    • StoryBB/StoryBB on GitHub
Re: Posted url is truncated
« Reply #5 on: August 04, 2017, 12:52:22 AM »
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...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Posted url is truncated
« Reply #6 on: August 04, 2017, 02:00:01 PM »
Eh, no big deal to use [url][/url] tags.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,458
    • StoryBB/StoryBB on GitHub
Re: Posted url is truncated
« Reply #7 on: August 04, 2017, 05:04:11 PM »
For cases like (), sure, but for the extended case of [] it's a huge deal ;)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.