note 39503 added to function.addcslashes
| From: | EmileSchenk at rn2 dot php dot net | Date: | Fri, 30 Jan 2004 17:50:14 +0000 |
| Subject: | note 39503 added to function.addcslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64451@lists.php.net to get a copy of this message | ||
This is easier done this way:
$out="some string with special chars";
$out=nl2br(htmlspecialchars(addslashes($out)));
$out=str_replace("\n",' ',$out);
$out=str_replace("\r",' ',$out);
print "<script>a='$out';
window.open('javascript:document.write(opener.a)');</script>";
----
Manual Page -- http://www.php.net/manual/en/function.addcslashes.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39503
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39503&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39503&report=yes
Search -- http://master.php.net/manage/user-notes.php