php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27021 strip_tags eliminates content in HTML comments
Submitted: 2004-01-23 10:43 UTC Modified: 2004-01-27 10:56 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mderk at yandex dot ru Assigned: nlopess (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.3.0 OS: Irrelevant
Private report: No CVE-ID: None
 [2004-01-23 10:43 UTC] mderk at yandex dot ru
Description:
------------
<?php
$str = '<!--b>here!</b-->';
print strip_tags($str);
?>
in PHP 4.2.2 it outputs 'here!'.
in PHP 4.3.4 it outputs nothing.
Maybe it should be treated as the right behavior, but it is definitely a BC violation.



Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-23 17:11 UTC] moriyoshi@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Who the heck gets in trouble with the new behaviour?

 [2004-01-26 02:57 UTC] mderk at yandex dot ru
I found an old script that had relied on the old behavior (which was "strip everything between &lt; and &gt;",  e.g. http://bugs.php.net/bug.php?id=15160) and broken under PHP 4.3.4. 
I would think of it at least as a documentation problem, not bogus. Don't you think that every php developer in the World would read this message to answer your question, even if he gets in trouble with the new behavior? The things that break BC should at least be documented. But there's no a word even in the Changes file.
 [2004-01-26 07:25 UTC] moriyoshi@php.net
Okay, I had missed that report and now noticed it was 
recognised wrongly. Anyway, I agree with you that 
strip_tags() is not well documented and it's the right 
time to add an extensive description because too many 
users rely on this magical function. Reclassifying this 
as a documentation problem.

 [2004-01-26 13:43 UTC] nlopess@php.net
Can somebody check when strip_tags() changed its behaviour, please?
I couldn't find this in CVS logs...
 [2004-01-27 10:41 UTC] nlopess@php.net
I've checked the sources and the behaviour changed in PHP 4.3.0. I'll update the docs.
 [2004-01-27 10:56 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=e660313dda339b6c6e2d7e31c11f70896c27d924
Log: fix #27021
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 03:01:28 2024 UTC