Function

WebKit2uri_for_display

Declaration [src]

gchar*
webkit_uri_for_display (
  const gchar* uri
)

Description [src]

Use this function to format a URI for display. The URIs used internally by WebKit may contain percent-encoded characters or Punycode, which are not generally suitable to display to users. This function provides protection against IDN homograph attacks, so in some cases the host part of the returned URI may be in Punycode if the safety check fails.

Available since:2.24

Parameters

uri const gchar*
 

The URI to be converted.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

Return value

Returns: gchar*
 

uri suitable for display, or NULL in case of error.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.
 The value is a NUL terminated UTF-8 string.