"MDL-12304, fix double text"
[moodle-linuxchix.git] / lib / htmlpurifier / HTMLPurifier / URIScheme / mailto.php
blobf6acc6af61faf9b0b3f3fc36c7421335e32a364a
1 <?php
3 require_once 'HTMLPurifier/URIScheme.php';
5 // VERY RELAXED! Shouldn't cause problems, not even Firefox checks if the
6 // email is valid, but be careful!
8 /**
9 * Validates mailto (for E-mail) according to RFC 2368
10 * @todo Validate the email address
11 * @todo Filter allowed query parameters
14 class HTMLPurifier_URIScheme_mailto extends HTMLPurifier_URIScheme {
16 var $browsable = false;
18 function validate(&$uri, $config, &$context) {
19 parent::validate($uri, $config, $context);
20 $uri->userinfo = null;
21 $uri->host = null;
22 $uri->port = null;
23 // we need to validate path against RFC 2368's addr-spec
24 return true;