From 5f5ca2c20587e035278163c9b444b36cfff6dced Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 17 Jul 2015 19:18:20 +0100 Subject: Add a function to retrieve the decoded version of IDNA URLs --- utils/nsurl.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'utils/nsurl.h') diff --git a/utils/nsurl.h b/utils/nsurl.h index b84f55eed..4fbc17b49 100644 --- a/utils/nsurl.h +++ b/utils/nsurl.h @@ -180,6 +180,20 @@ bool nsurl_has_component(const nsurl *url, nsurl_component part); const char *nsurl_access(const nsurl *url); +/** + * Access a NetSurf URL object as a UTF-8 string (for human readable IDNA) + * + * \param url NetSurf URL to retrieve a string pointer for. + * \return the required string + * + * It is up to the client to free the returned string when they have + * finished with it. + * + * The returned string has a trailing '\0'. + */ +const char *nsurl_access_utf8(const nsurl *url); + + /** * Access a URL's path leaf as a string * -- cgit v1.2.1