1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @author Thomas Müller <[email protected]> |
5
|
|
|
* |
6
|
|
|
* Mail |
7
|
|
|
* |
8
|
|
|
* This code is free software: you can redistribute it and/or modify |
9
|
|
|
* it under the terms of the GNU Affero General Public License, version 3, |
10
|
|
|
* as published by the Free Software Foundation. |
11
|
|
|
* |
12
|
|
|
* This program is distributed in the hope that it will be useful, |
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
* GNU Affero General Public License for more details. |
16
|
|
|
* |
17
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3, |
18
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/> |
19
|
|
|
* |
20
|
|
|
*/ |
21
|
|
|
|
22
|
|
|
namespace OCA\Mail\Service\HtmlPurify; |
23
|
|
|
|
24
|
|
|
use HTMLPurifier_Config; |
25
|
|
|
use HTMLPurifier_Context; |
26
|
|
|
use HTMLPurifier_URI; |
27
|
|
|
use HTMLPurifier_URIScheme; |
28
|
|
|
|
29
|
|
|
class CidURIScheme extends HTMLPurifier_URIScheme { |
30
|
|
|
|
31
|
|
|
public $default_port = null; |
32
|
|
|
public $browsable = true; |
33
|
|
|
public $hierarchical = true; |
34
|
|
|
|
35
|
|
|
public function validate(&$uri, $config, $context) { |
36
|
|
|
return true; |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Validates the components of a URI for a specific scheme. |
41
|
|
|
* |
42
|
|
|
* @param HTMLPurifier_URI $uri Reference to a HTMLPurifier_URI object |
43
|
|
|
* @param HTMLPurifier_Config $config |
44
|
|
|
* @param HTMLPurifier_Context $context |
45
|
|
|
* @return bool success or failure |
46
|
|
|
*/ |
47
|
|
|
public function doValidate(&$uri, $config, $context) { |
48
|
|
|
return true; |
49
|
|
|
} |
50
|
|
|
} |
51
|
|
|
|