egroupware/phpgwapi/inc/htmlpurifier/library/HTMLPurifier/URIScheme/cid.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