#30603 [NEW]: eval() - some double quotes are removed

From: Date: Thu, 28 Oct 2004 17:43:13 +0000
Subject: #30603 [NEW]: eval() - some double quotes are removed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68440@lists.php.net to get a copy of this message
From: naderman at gmx dot de Operating system: GNU/Linux (Debian) PHP version: 4.3.9 PHP Bug Type: Unknown/Other Function Bug description: eval() - some double quotes are removed Description: ------------ I use a templating engine, and tried to put escaped quotes inside an html attribute, but the result was quite different to what I expected, the quotes in the end were missing. Afterwards I tried to do the same with smarty, but the result was the same. I found out, that this only happens inside quotes inside a html tag. This only happens with double quotes. Single quotes are not removed, but I need to use double quotes because my original intention was to use javascript inside onmouseover. I use the Debian PHP Package. (This also happend with a self compiled version of PHP 5.0.2) Reproduce code: --------------- <?php $var = 'This is a \\"test\\"'; eval(' ?><a title="<?php echo $var; ?>"><?php '); ?> Expected result: ---------------- <a title="This is a \"test\""> Actual result: -------------- <a title="This is a \"test\> -- Edit bug report at http://bugs.php.net/?id=30603&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30603&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30603&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30603&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30603&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30603&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30603&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30603&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30603&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30603&r=support Expected behavior: http://bugs.php.net/fix.php?id=30603&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30603&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30603&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30603&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30603&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30603&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30603&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30603&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30603&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30603&r=mysqlcfg

« previous php.bugs (#68440) next »