12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- class HTMLPurifier_URIScheme_tel extends HTMLPurifier_URIScheme
- {
-
- public $browsable = false;
-
- public $may_omit_host = true;
-
- public function doValidate(&$uri, $config, $context)
- {
- $uri->userinfo = null;
- $uri->host = null;
- $uri->port = null;
-
-
- $uri->path = preg_replace('/(?!^\+)[^\dx]/', '',
-
- str_replace('X', 'x', $uri->path));
- return true;
- }
- }
|