[PHP-BUG] Bug #63212 [NEW]: <' breaks strip_tags()
From: dac dot chartrand at gmail dot com Operating system: PHP version: 5.4.7 Package: *General Issues Bug Type: Bug Bug description: <' breaks strip_tags() Description: The following character combo <' breaks strip_tags(): <' Test script: --- Hello WorldShould be removedGoodbye World"; $content = strip_tags($content, ''); echo $content; // Good // Hello WorldShould be removedGoodbye World $content = "Hello WorldShould <' be removedGoodbye World"; $content = strip_tags($content, ''); echo $content; // Bad // Hello WorldShould Expected result: Hello WorldShould be removedGoodbye World Actual result: -- Hello WorldShould -- Edit bug report at https://bugs.php.net/bug.php?id=63212&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63212&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63212&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63212&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63212&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63212&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63212&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63212&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63212&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63212&r=support Expected behavior: https://bugs.php.net/fix.php?id=63212&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63212&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63212&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63212&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63212&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63212&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63212&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63212&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63212&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63212&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63212&r=mysqlcfg
Bug #63212 [Nab]: <' breaks strip_tags()
Edit report at https://bugs.php.net/bug.php?id=63212&edit=1 ID: 63212 User updated by: dac dot chartrand at gmail dot com Reported by: dac dot chartrand at gmail dot com Summary: <' breaks strip_tags() Status: Not a bug Type: Bug Package:*General Issues PHP Version:5.4.7 Block user comment: N Private report: N New Comment: Hi Pierrick I disagree. Maybe my report needs more info. Here are two other examples: -=-=- $content = "Hello WorldShould <# > be removed Goodbye World"; $content = strip_tags($content, ' '); echo $content; // Hello WorldShould be removedGoodbye World $content = "Hello WorldShould <' > be removed Goodbye World"; $content = strip_tags($content, ' '); echo $content; // Hello WorldShould -=-=- Thanks for looking into this. Previous Comments: [2012-10-03 23:34:14] pierr...@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 Hi Daniel, I don't think this is a bug. You're opening a tag which is not terminated. So strip_tags will strip it. If you replace your <' by any other char (but space) like '); echo $content; // Good // Hello WorldShould be removedGoodbye World $content = "Hello WorldShould <' be removedGoodbye World"; $content = strip_tags($content, ''); echo $content; // Bad // Hello WorldShould Expected result: Hello WorldShould be removedGoodbye World Actual result: -- Hello WorldShould -- Edit this bug report at https://bugs.php.net/bug.php?id=63212&edit=1
Req #41243 [Com]: How to use ZIPARCHIVE::CM_STORE
Edit report at https://bugs.php.net/bug.php?id=41243&edit=1 ID: 41243 Comment by: dac dot chartrand at gmail dot com Reported by:joel dot alexandre at gmail dot com Summary:How to use ZIPARCHIVE::CM_STORE Status: Assigned Type: Feature/Change Request Package:Zip Related PHP Version:5.x Assigned To:pajoye Block user comment: N Private report: N New Comment: I need to create a zip file with a compression level of 0 on some files. Specifically, the EPUB 2.0.1 specification *requires* a file called mimetype to uncompressed, unencrypted, and the first file in the ZIP archive. Without this feature available in ZipArchive, it's useless for EPUB creation. Thank you for your consideration. Previous Comments: [2012-10-26 12:34:23] kalibrov1 at gmail dot com Faced with the same problem, I can not create the correct ODS file! [2012-10-17 12:01:39] spamme at filbilisim dot com For back up features and performance issues uncompressed zipping is essential. Please provide this feature [2012-07-18 16:54:16] frozenf...@php.net Any progress on this, pajoye? Given the number of votes on this bug, and its age, I think this needs to be addressed as soon as possible. I encountered this bug today, and it's quite frustrating to not be able to set the compression level. [2012-01-23 10:57:54] mpeters at domblogger dot net It is imperative that this bug be addressed and fixed. The epub specification requires that the first file in the zip archive be named mimetype and be uncompressed. Until this bug is fixed, it is thus impossible to create a valid epub file in pure php w/o executing system commands (forbidden in many environments). *maybe* it could be worked around by having a skeleton zip archive with the mimetype file in it uncompressed, but really, we need to be able to create a fresh zip archive, add that file, with no compression. [2010-07-02 14:20:03] php at atis dot id dot lv This would be quite nice for me too. No compression could be useful for creating large archives of multiple files on the fly. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=41243 -- Edit this bug report at https://bugs.php.net/bug.php?id=41243&edit=1