mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
add a cid scheme to purifiers URI schemes, to be able to process inlineimages in eMails.
This commit is contained in:
parent
c3df45932f
commit
8d3d3c8a6d
@ -0,0 +1,25 @@
|
||||
<?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
|
Loading…
Reference in New Issue
Block a user