0byt3m1n1
Path:
/
home1
/
aserty
/
public_html
/
bonniescraftygifts.com
/
iFzj4
/
configCHM
/
Jump
/
0-aserty
/
appartsoft.com
/
wp-content
/
plugins
/
wordpress-mobile-pack
/
libs
/
htmlpurifier-4.8.0
/
library
/
HTMLPurifier
/
URIScheme
/
[
Home
]
File: skype.php
<?php /** * Validates 'skype:skype_user?call' number in URI */ class HTMLPurifier_URIScheme_skype 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; // my legal phone # chars: alphanumeric, underscore, hyphen, optional "+" for the first character. That's it. But you can allow whatever you want. Just change this: $validCalltoPhoneNumberPattern = '/^[a-zA-Z0-9_\-,\.]+$/i'; // <---whatever pattern you want to force phone numbers to match $proposedPhoneNumber = $uri->path; if (preg_match($validCalltoPhoneNumberPattern, $proposedPhoneNumber) !== 1) { // submitted phone # inside the href attribute value looks bad; reject the phone number, and let HTMLpurifier remove the whole href attribute on the submitted <a> tag. return false; } else { // submitted phone # inside the href attribute value looks OK; accept the phone number; HTMLpurifier should NOT strip the href attribute on the submitted <a> tag. return true; } } } // vim: et sw=4 sts=4