0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-09 15:28:40 +00:00
htmlpurifier/tests/HTMLPurifier
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
..
AttrDef Dramatically rewrite null host URI handling. 2011-01-25 18:56:46 +00:00
AttrTransform Fix bad configuration call in NameSyncTest.php. 2009-03-14 19:18:02 -04:00
ChildDef Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
ConfigSchema Revamp configuration backend. 2009-02-21 03:00:33 -05:00
DefinitionCache Add new Cache.SerializerPermissions option. 2011-01-13 22:57:40 +00:00
Filter Rewrite CSS url() and font-family output logic. 2010-05-31 18:45:21 -07:00
HTMLModule Fix two bugs with caching of customized raw definitions. 2010-12-30 23:51:53 +00:00
HTMLT Dramatically rewrite null host URI handling. 2011-01-25 18:56:46 +00:00
Injector Implement auto-formatter that removes empty span tags. 2010-03-07 18:59:33 -05:00
Lexer Emit errors when body is extracted. 2010-05-04 13:41:09 -04:00
PHPT Add sanity check against ze1_compatibility_mode. 2010-11-12 16:15:03 +00:00
SimpleTest Implement user-friendly links to test-cases on web tester. 2008-12-20 13:01:20 -05:00
Strategy Fix two bugs with caching of customized raw definitions. 2010-12-30 23:51:53 +00:00
StringHashParser Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
URIFilter Actually make URI.DisableResources do something. 2010-06-30 05:59:17 -07:00
VarParser Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
AttrCollectionsTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
AttrDefHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
AttrDefTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
AttrTransformHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
AttrTransformTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
AttrTypesTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
AttrValidator_ErrorsTest.php Fix two bugs with caching of customized raw definitions. 2010-12-30 23:51:53 +00:00
ChildDefHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ComplexHarness.php Make name="" and id="" play nicely together. 2009-02-21 02:58:30 -05:00
ConfigSchemaTest.php Revamp configuration backend. 2009-02-21 03:00:33 -05:00
ConfigTest-create.ini Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ConfigTest-finalize.ini Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ConfigTest-loadIni.ini Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ConfigTest.php Fix two bugs with caching of customized raw definitions. 2010-12-30 23:51:53 +00:00
ContextTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
DefinitionCacheFactoryTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
DefinitionCacheHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
DefinitionCacheTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
DefinitionTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
DefinitionTestable.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
DoctypeRegistryTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ElementDefTest.php Fix inability to totally override content model. 2009-06-10 18:24:52 -04:00
EncoderTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
EntityLookupTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
EntityParserTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ErrorCollectorEMock.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ErrorCollectorTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
ErrorsHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
GeneratorTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
Harness.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
HTMLDefinitionTest.php Fix two bugs with caching of customized raw definitions. 2010-12-30 23:51:53 +00:00
HTMLModuleHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
HTMLModuleManagerTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
HTMLModuleTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
HTMLT.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
IDAccumulatorTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
InjectorHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
LanguageFactoryTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
LanguageTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
LengthTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
LexerTest.php Fix incorrect PEARSax3 test assertion. 2010-11-12 16:06:34 +00:00
PercentEncoderTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
PropertyListTest.php Convert HTMLPurifier_Config to use property list backend. 2009-02-02 18:42:23 -05:00
StrategyHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
StringHashParserTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
StringHashTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
TagTransformTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
TokenFactoryTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
TokenTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
UnitConverterTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
URIDefinitionTest.php Convert all to new configuration get/set format. 2009-02-21 03:00:34 -05:00
URIFilterHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
URIHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
URIParserTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
URISchemeRegistryTest.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00
URISchemeTest.php Dramatically rewrite null host URI handling. 2011-01-25 18:56:46 +00:00
URITest.php Dramatically rewrite null host URI handling. 2011-01-25 18:56:46 +00:00
VarParserHarness.php Add vim modelines to all files. 2008-12-06 04:24:59 -05:00