File indexing completed on 2024-12-22 05:36:21

0001 <?php
0002 
0003 // VERY RELAXED! Shouldn't cause problems, not even Firefox checks if the
0004 // email is valid, but be careful!
0005 
0006 /**
0007  * Validates mailto (for E-mail) according to RFC 2368
0008  * @todo Validate the email address
0009  * @todo Filter allowed query parameters
0010  */
0011 
0012 class HTMLPurifier_URIScheme_mailto extends HTMLPurifier_URIScheme
0013 {
0014     /**
0015      * @type bool
0016      */
0017     public $browsable = false;
0018 
0019     /**
0020      * @type bool
0021      */
0022     public $may_omit_host = true;
0023 
0024     /**
0025      * @param HTMLPurifier_URI $uri
0026      * @param HTMLPurifier_Config $config
0027      * @param HTMLPurifier_Context $context
0028      * @return bool
0029      */
0030     public function doValidate(&$uri, $config, $context)
0031     {
0032         $uri->userinfo = null;
0033         $uri->host     = null;
0034         $uri->port     = null;
0035         // we need to validate path against RFC 2368's addr-spec
0036         return true;
0037     }
0038 }
0039 
0040 // vim: et sw=4 sts=4