From: Alex Schroeder Date: Wed, 4 Aug 2021 14:27:17 +0000 (+0200) Subject: Add IRI support X-Git-Tag: v3.3.0~22^2 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=commitdiff_plain;h=65621cde0534f742b5cbd9b523938b296bdd8080;hp=65621cde0534f742b5cbd9b523938b296bdd8080 Add IRI support When getting the address of a URL, use the current scheme as URL type, if one exists. If no scheme is provided for a URL, the current context specifies the scheme to use, so if we’re looking at a gemini page, then the default type is "gemini" even if elpher-default-url-type is "gopher". When creating the display-string for a page from a URL, use a new functino that creates an IRI instead. It decodes percent-escapes and handles punycode in the host name. It also hides the password, if any, since that's what RFC 3986 says we should do. When getting the display-string of a Gemini link line without a text, do the same: don't just use the URL, use the corresponding IRI, decoding percent-escapes and handling punycode in the host name. When getting the URL of a Gemini link line, do the reverse: if this is an IRI instead of a URI, use punycode for the host; percent-escaping is already handled by url-generic-parse-url. ---