Application Framework Reference

App Server Utilities API

url_has_valid_charset()

The url_has_valid_charset() function validates the URL character set against RFC 3986.

Synopsis

results = url_has_valid_charset(url)

Parameters

url

String

URL to be validated.

Return Value

Boolean

Valid URL indication:

True = The url is valid.

False = The url is invalid.

Example

from splunk.appserver.mrsparkle.lib import util

if (util.url_has_valid_charset('http://localhost:8000/en-US/account/login'))
    ... valid URL ...
else
    ... invalid URL ...
 

See Also

make_url()
strip_url()