Using a real HTML tokenizer fixes bugs when < or > appear in attribute
values. The old implementation used delimiterReplace(), which didn't
handle this case:
> print Sanitizer::stripAllTags( '<p data-foo="a<b>c">Hello</p>' );
c">Hello
We also can't use PHP's built-in strip_tags() because it doesn't handle
<?php and <? correctly:
> print strip_tags('1<span class="<?php">2</span>3');
1
> print strip_tags('1<span class="<?">2</span>3');
1
Bug: T179978
Change-Id: I53b98e6c877c00c03ff110914168b398559c9c3e
|
||
|---|---|---|
| .. | ||
| MagicVariableTest.php | ||
| ParserIntegrationTest.php | ||
| ParserMethodsTest.php | ||
| ParserOptionsTest.php | ||
| ParserOutputTest.php | ||
| ParserPreloadTest.php | ||
| PreprocessorTest.php | ||
| SanitizerTest.php | ||
| TagHooksTest.php | ||
| TidyTest.php | ||