diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
commit | 99679d06884120c57f43b44e55e03595f1f87bed (patch) | |
tree | a3f2a1aa1afdaeca1386d0c6e8a75344fd2241fb /inc/3rdparty/htmlpurifier/HTMLPurifier/URIScheme/mailto.php | |
parent | 655214ab30ee84884dc408488b85586f36263fcb (diff) | |
parent | d3b47e94705e17b3ba3529cbb1dc6efe69c5d2b7 (diff) | |
download | wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.gz wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.zst wallabag-99679d06884120c57f43b44e55e03595f1f87bed.zip |
Merge pull request #481 from wallabag/dev1.5.2
1.5.2
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/URIScheme/mailto.php')
-rw-r--r-- | inc/3rdparty/htmlpurifier/HTMLPurifier/URIScheme/mailto.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/URIScheme/mailto.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/URIScheme/mailto.php new file mode 100644 index 00000000..b8a40d7e --- /dev/null +++ b/inc/3rdparty/htmlpurifier/HTMLPurifier/URIScheme/mailto.php | |||
@@ -0,0 +1,40 @@ | |||
1 | <?php | ||
2 | |||
3 | // VERY RELAXED! Shouldn't cause problems, not even Firefox checks if the | ||
4 | // email is valid, but be careful! | ||
5 | |||
6 | /** | ||
7 | * Validates mailto (for E-mail) according to RFC 2368 | ||
8 | * @todo Validate the email address | ||
9 | * @todo Filter allowed query parameters | ||
10 | */ | ||
11 | |||
12 | class HTMLPurifier_URIScheme_mailto extends HTMLPurifier_URIScheme | ||
13 | { | ||
14 | /** | ||
15 | * @type bool | ||
16 | */ | ||
17 | public $browsable = false; | ||
18 | |||
19 | /** | ||
20 | * @type bool | ||
21 | */ | ||
22 | public $may_omit_host = true; | ||
23 | |||
24 | /** | ||
25 | * @param HTMLPurifier_URI $uri | ||
26 | * @param HTMLPurifier_Config $config | ||
27 | * @param HTMLPurifier_Context $context | ||
28 | * @return bool | ||
29 | */ | ||
30 | public function doValidate(&$uri, $config, $context) | ||
31 | { | ||
32 | $uri->userinfo = null; | ||
33 | $uri->host = null; | ||
34 | $uri->port = null; | ||
35 | // we need to validate path against RFC 2368's addr-spec | ||
36 | return true; | ||
37 | } | ||
38 | } | ||
39 | |||
40 | // vim: et sw=4 sts=4 | ||