AppleOpenSource/WebKit2-7609.3.5.1.3/UIProcess/API/glib/WebKitURIUtilities.cpp
/**
 * webkit_uri_for_display:
 * @uri: the URI to be converted
 *
 * 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.
 *
 * Returns: (nullable) (transfer full): @uri suitable for display, or %NULL in
 *    case of error.
 *
 * Since: 2.24
 */
@uri: the URI to be converted

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.

(nullable) (transfer full): @uri suitable for display, or %NULL in
case of error.


@uri : the URI to be converted 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 . ( nullable ) ( transfer full ) : @uri suitable for display or %NULL in case of error .
gchar* webkit_uri_for_display(const gchar* uri)
{
    g_return_val_if_fail(uri, nullptr);
    String result = WTF::URLHelpers::userVisibleURL(uri);
    if (!result)
        return nullptr;
    return g_strdup(result.utf8().data());
}
gchar * webkit_uri_for_display ( const gchar * uri ) { g_return_val_if_fail ( uri , nullptr ) ; String result = WTF :: URLHelpers :: userVisibleURL ( uri ) ; if ( ! result ) return nullptr ; return g_strdup ( result . utf8 ( ) . data ( ) ) ; }
webkit_uri_for_display:
 @uri: the URI to be converted
webkit_uri_for_display : @uri : the URI to be converted