$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.214

Twitter updates

    Error retrieving Twitter status

Latest news

  • ProcessWire Weekly #473
    In the 473rd issue of ProcessWire Weekly we'll check out latest core updates, introduce new third party module called Template Fragment Controller, and more. Read on!
    Weekly.pw / 3 June 2023
  • A look at the new Page Edit Restore module
    The new Page Edit Restore module helps to prevent page edits in the admin from getting lost when the user’s session is lost. This post covers it in detail.
    Blog / 12 May 2023
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull