]> git.mxchange.org Git - friendica.git/blob - src/Content/Text/HTMLPurifier_URIScheme_cid.php
Merge pull request #10493 from annando/api
[friendica.git] / src / Content / Text / HTMLPurifier_URIScheme_cid.php
1 <?php
2
3 namespace Friendica\Content\Text;
4
5 use \HTMLPurifier_URIScheme;
6
7 /**
8  * Validates content-id ("cid") as used in multi-part MIME messages, as defined by RFC 2392
9  */
10 class HTMLPurifier_URIScheme_cid extends HTMLPurifier_URIScheme
11 {
12         /**
13          * @type bool
14          */
15         public $browsable = true;
16
17         /**
18          * @type bool
19          */
20         public $may_omit_host = true;
21
22         /**
23          * @param HTMLPurifier_URI $uri
24          * @param HTMLPurifier_Config $config
25          * @param HTMLPurifier_Context $context
26          * @return bool
27          */
28         public function doValidate(&$uri, $config, $context)
29         {
30                 $uri->userinfo = null;
31                 $uri->host = null;
32                 $uri->port = null;
33                 $uri->query = null;
34                 // typecode check needed on path
35                 return true;
36         }
37 }