Stupid PHP move

Date June 13, 2006

Yes, this happened awhile back, and is another shining example of why people have a hard time trusting/adopting PHP as a real ‘enterprise’ language.

From http://php.net/strip_tags:

Since PHP 4.3.0, HTML comments are also stripped. This is hardcoded and can not be changed with allowable_tags.

So, in other words, behaviour that existed for years is unceremoniously removed without warning and without any other useful option available.

I looked through the CVS comments for the strip_tags function here and didn’t find *any* mention of HTML comments.  Interestingly, there was some work done to strip_tags to make it aware of XML tags.  Why didn’t they put this in the parser and make PHP work with short tags AND XML like I’ve posted about before?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">