URL-Encoding Issue

The browser might encode the URL, but then WackoWiki fails on parsing it it different ways.


https://superuser.com/question[...]ox-address-bar-as-is


https://ru.wikipedia.org/wiki/[...]аби;
https://ru.wikipedia.org/wiki/[...]81%D0%B0%D0%B1%D0%B8
https://ru.wikipedia.org/wiki/[...]BF%D0%B0%D0%B4%D0%B5


https://de.wikipedia.org/wiki/Geh%C3%B6rnte_Mauerbiene – copy & paste URL from Browser
https://de.wikipedia.org/wiki/Gehörnte_Mauerbiene


The unwanted encoding happens in the pre_link() function.


WackoFormatter -> prelink()


introduced here:
https://bitbucket.org/wackowik[...]/wacko.phpF1531T1531


but do we really need urldecode($tag) ?


current version
https://bitbucket.org/wackowik[...]wacko.php#lines-3559


so what could happen when we remove urldecode(), without the encoded link will
work as intended


https://ru.wikipedia.org/wiki/[...]81%D0%B0%D0%B1%D0%B8 (works
again without urldecode())


https://www.php.net/manual/en/function.urldecode.php


I looked it up, it was back-ported from openSpace -> R5.0.


Are there use-cases we need urldecode($tag) in the pre_link() function, and if
so can we differentiate the case, internal link versus external link ?


FIXED
https://bitbucket.org/wackowik[...]85040d8d960d1d56e97a


Links

  1. Percent-encoding
  2. Internationalized Resource Identifier