mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
- Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly)
This commit is contained in:
parent
5ddbeffc6f
commit
bbf58f9234
1
NEWS
1
NEWS
@ -66,6 +66,7 @@
|
||||
|
||||
- Fixed bug #53323 (pdo_firebird getAttribute() crash).
|
||||
(preeves at ibphoenix dot com)
|
||||
- Fixed Bug #53319 (strip_tags() may strip '<br />' incorrectly). (Felipe)
|
||||
- Fixed bug #53305 (E_NOTICE when defining a constant starts with
|
||||
__COMPILER_HALT_OFFSET__). (Felipe)
|
||||
- Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return
|
||||
|
@ -4211,9 +4211,8 @@ int php_tag_find(char *tag, int len, char *set) {
|
||||
if (!isspace((int)c)) {
|
||||
if (state == 0) {
|
||||
state=1;
|
||||
if (c != '/')
|
||||
*(n++) = c;
|
||||
} else {
|
||||
}
|
||||
if (c != '/') {
|
||||
*(n++) = c;
|
||||
}
|
||||
} else {
|
||||
|
17
ext/standard/tests/strings/bug53319.phpt
Normal file
17
ext/standard/tests/strings/bug53319.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #53319 (Strip_tags() may strip '<br />' incorrectly)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$str = '<br /><br />USD<input type="text"/><br/>CDN<br><input type="text" />';
|
||||
var_dump(strip_tags($str, '<input>'));
|
||||
var_dump(strip_tags($str, '<br><input>') === $str);
|
||||
var_dump(strip_tags($str));
|
||||
var_dump(strip_tags('<a/b>', '<a>'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(47) "USD<input type="text"/>CDN<input type="text" />"
|
||||
bool(true)
|
||||
string(6) "USDCDN"
|
||||
string(0) ""
|
Loading…
Reference in New Issue
Block a user