|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-28 22:25 UTC] naderman at gmx dot de
[2004-10-28 22:38 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 09:00:01 2025 UTC |
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\>