mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:49:10 +01:00
26 lines
696 B
PHP
26 lines
696 B
PHP
<?php
|
|
|
|
/**
|
|
* Validates cid (internal images in emails)
|
|
* @todo Filter allowed query parameters
|
|
*/
|
|
|
|
class HTMLPurifier_URIScheme_cid extends HTMLPurifier_URIScheme {
|
|
|
|
public $browsable = true;
|
|
|
|
public function validate(&$uri, $config, $context) {
|
|
//error_log(__METHOD__." calledi with:".print_r($uri,true));
|
|
//parent::validate($uri, $config, $context);
|
|
$uri->userinfo = null;
|
|
$uri->host = null;
|
|
$uri->port = null;
|
|
$uri->query = null;
|
|
if (!empty($uri->path)) return true;
|
|
return false;
|
|
}
|
|
|
|
}
|
|
HTMLPurifier_URISchemeRegistry::instance()->register('cid', new HTMLPurifier_URIScheme_cid());
|
|
// vim: et sw=4 sts=4
|