-
Hi
I want to filter a form input for html/php tags.
So far I've got this.
<?
$text = "<test> after a couple of spaces";
echo nl2br(ereg_replace(" ", " ", strip_tags($text)));
?>
If the $text contains a " (double quot charachter) the script will produce a parse error. Does someone know a solution for this?
Thanx in advance
-
Simply escape the double quotes with backslashes:
$text = "This is what we call a <I>\"TEST\"</I>!";
[Edited by kyank on 10-21-2000 at 10:19 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks