Advertisement:

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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,090
  • 'Tis the gift to be simple
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: 68,041
    • Arantor 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,090
  • 'Tis the gift to be simple
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

  • Semi-Newbie
  • *
  • Posts: 91
  • 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: 68,041
    • Arantor 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,041
    • Arantor 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...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,090
  • 'Tis the gift to be simple
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: 68,041
    • Arantor 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 ;)
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.