This is a comment on Customizing page addresses, posted by WikiAdmin at 28.01.2022 09:18
View source for Re: Customizing page addresses
**A. URL in the address bar of the browser** There is a solution, but each browser may use different default settings regarding the **IRI** and **IDN** format. Example Firefox: 1. IRI: You can set the ##browser.urlbar.decodeURLsOnCopy## to ##true## via ##about:config##. * if you copy the URL it is not ##~https://ru.wikipedia.org/wiki/%D0%92%D0%B0%D0%B1%D0%B8-%D1%81%D0%B0%D0%B1%D0%B8## but ##~https://ru.wikipedia.org/wiki/Ваби-саби##. 1. IDN: Additionally you can enable or disable the IDN Punycode in Firefox address bar by calling ##IDN_show_punycode## via ##about:config##. * ##~https://яндекс.рф## <-> ##~https://xn--d1acpjx3f.xn--p1ai## When you copy an URL in the address bar of Firefox and leaving the first letter out, it also copies the string as is, e.g. ##ttp:/example.com/Начало## Opera and Vivaldi for example use the IRI format by default. Chrome Extension ((https://chrome.google.com/webstore/detail/copy-unicode-urls/fnbbfiapefhkicjhecnoepbijhanpkjp?hl=en-US Copy Unicode URLs)) - Copy Unicode URLs to clipboard without nasty percent-encodings or Punycode! **B. HTML links** However the ##mini_href()## function in WackoWiki percent-encodes all URIs to ensure backwards-compatibility with systems that do not support the IRI format. %% // percent-encode the non-ASCII bytes (rfc3986) if ($encode) { $tag = str_replace(['%2F', '%3F', '%3D'], ['/', '?', '='], rawurlencode($tag)); } %% ((https://www.php.net/manual/en/function.rawurlencode.php rawurlencode)) So you can try to turn the default of the ##$encode## parameter in the ##href()## function from ##true## to ##false##. It needs more feedback and evaluation, may be we can add a config option to disable the percent-encoding partially. Some functions require the rfc3986 compliant format mandatory. HTTP does not allow IRI, only URI. IRIs are a URI generalization that allows Unicode characters. #| *| Format | Example |* || URI | ##~https://ru.wikipedia.org/wiki/%D0%92%D0%B0%D0%B1%D0%B8-%D1%81%D0%B0%D0%B1%D0%B8## || || IRI | ##~https://ru.wikipedia.org/wiki/Ваби-саби## || |# ((https://tools.ietf.org/html/rfc3986 RFC 3986)) ((https://tools.ietf.org/html/rfc3987 RFC 3987)) ((https://en.wikipedia.org/wiki/Uniform_Resource_Identifier Uniform Resource Identifier)) ((https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier Internationalized Resource Identifier)) **C. Alternate links** Via the URI router alternate links can be created like the permalink. These links can be created for any possible purpose. * ((/Dev/NewFeatures/SeoFriendlyUrl Request handling)) * ((/Dev/Projects/UriRouter URI Router))