$sanitizer->httpUrl() method

URL with http or https scheme required

Available since version 3.0.129.

Usage

// basic usage
$string = $sanitizer->httpUrl(string $value);

// usage with all arguments
$string = $sanitizer->httpUrl(string $value, array $options = []);

Arguments

NameType(s)Description
valuestring

URL to validate

options (optional)array

See the url() method for all options.

Return value

string

Returns valid URL or blank string if it cannot be made valid.


$sanitizer methods and properties

API reference based on ProcessWire core version 3.0.137

Twitter updates

  • ProcessWire 3.0.146 on the dev branch contains about 22 commits with a combination of useful upgrades and issue report resolutions, more details in this forum post: More
    22 November 2019
  • ProcessWire 3.0.144 and 3.0.145 add improved field template context override settings and include a new Inputfields API, along with numerous other issue fixes, optimizations and improvements to the core. More
    8 November 2019
  • ProcessWire 3.0.144 core updates: Upgraded overrides section in the field editor, a new Inputfields JS API, and more— More
    1 November 2019

Latest news

  • ProcessWire Weekly #291
    In the 291st issue of ProcessWire Weekly we're going to take a closer look at the latest core updates, check out a brand new third party module called ProcessHelpVideos, and introduce a new site of the week. Read on!
    Weekly.pw / 8 December 2019
  • New User Activity module
    Blog / 29 November 2019
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.