0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 08:21:52 +00:00
htmlpurifier/library
Edward Z. Yang e76f4b45d0 Dramatically rewrite null host URI handling.
Basically, browsers don't parse what should be valid URIs correctly, so
we have to go through some backbends to accomodate them.  Specifically,
for browseable URIs, the following URIs have unintended behavior:

    - ///example.com
    - http:/example.com
    - http:///example.com

Furthermore, if the path begins with //, modifying these URLs must
be done with care, as if you remove the host-name component, the
parse tree changes.

I've modified the engine to follow correct URI semantics as much
as possible while outputting browser compatible code, and invalidate
the URI in cases where we can't deal.  There has been a refactoring
of URIScheme so that this important check is always performed,
introducing a new member variable allow_empty_host which is true
on data, file, mailto and news schemes.

This also fixes bypass bugs on URI.Munge.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
2011-01-25 18:56:46 +00:00
..
HTMLPurifier Dramatically rewrite null host URI handling. 2011-01-25 18:56:46 +00:00
HTMLPurifier.auto.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
HTMLPurifier.autoload.php Add sanity check against ze1_compatibility_mode. 2010-11-12 16:15:03 +00:00
HTMLPurifier.func.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
HTMLPurifier.includes.php Implement HTML.Nofollow for external links. 2010-09-28 12:01:57 -04:00
HTMLPurifier.kses.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
HTMLPurifier.path.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
HTMLPurifier.php Release 4.2.0. 2010-09-15 02:52:57 -04:00
HTMLPurifier.safe-includes.php Implement HTML.Nofollow for external links. 2010-09-28 12:01:57 -04:00