4 * Validates file as defined by RFC 1630 and RFC 1738.
6 class HTMLPurifier_URIScheme_file
extends HTMLPurifier_URIScheme
9 * Generally file:// URLs are not accessible from most
10 * machines, so placing them as an img src is incorrect.
13 public $browsable = false;
16 * Basically the *only* URI scheme for which this is true, since
17 * accessing files on the local machine is very common. In fact,
18 * browsers on some operating systems don't understand the
19 * authority, though I hear it is used on Windows to refer to
23 public $may_omit_host = true;
26 * @param HTMLPurifier_URI $uri
27 * @param HTMLPurifier_Config $config
28 * @param HTMLPurifier_Context $context
31 public function doValidate(&$uri, $config, $context)
33 // Authentication method is not supported
34 $uri->userinfo
= null;
35 // file:// makes no provisions for accessing the resource
37 // While it seems to work on Firefox, the querystring has
38 // no possible effect and is thus stripped.