Hi,<br><br>I'm new to PHP, but I know a lot of Perl (5 years, playing in my spare time).<br><br>Anyway, I'm playing with a simple guestboard-script (see below) and <br>everything can be submitted, except quotes (" and '), they are escaped like: \" or \'<br><br>this creates problems when a URL is submitted like: <br><a href="url">blah</a><br>it comes out as: <a href=\"url\">blah</a><br>which doesn't work.<br>leaving the "'s does work, but that isn't intuitive (from the user's <br>perspective)<br><br>What am I doing wrong?<br><br>Cheers<br><br>Simon<br><br>----- php code below ----<br><br><?<br>/* <br><br>annotate.php3 <br><br>This is a module that can be placed on any php3 page to allow users to <br>add <br>their comments. The comments are stored in a file in the current <br>directory, <br>whose name is constructed by adding ".comment" to the calling page's <br>name, <br>and merged into the calling page dynamically. (The calling page is not <br>modified.) <br><br>I wrote this because I wanted a simple way to add this functionality to <br>my <br>pages without requiring that mySQL be available. <br><br>In the message input, blank lines are converted to paragraph tags. No <br>other <br>conversions are applied. If you don't want your users to be able to <br>input <br>html, uncomment the "strip_tags" line. <br><br>Note that the directory must be writable by the web server. <br><br>Put this module in some convenient location and then embed it in your <br>pages <br>like so: <br><br>require("/some/full/path/annotate.php3" <br>or, relative to the docroot: <br>require($DOCUMENT_ROOT . "/relativepath/php3" <br><br>Steve Yelvington <<A HREF="mailto:steve@yelvington.com">steve@yelvington.com</A>> <br>*/ <br>$commentdir = "annotate/";<br>$commentfile = $commentdir . basename($PHP_SELF) . ".comment";<br>/* print "<br><b>$commentfile</b><br>"; */<br><br>if ($message) <br> { <br> /* uncomment the next two lines to strip out html from input */ <br> /* $name = strip_tags($name); */ <br> /* $message = strip_tags($message); */ <br> $message = ereg_replace( "\r\n\r\n", "\n<P>", $message); <br> $message = ereg_replace( "\r\n", "\n<BR>", $message); <br> $date = date( "l, F j Y, h:i a" <br> $message = "\n<p><B>$name </B> -- $date</p>\n<P>$message <br></P>\n<HR>\n\n"; <br> $fp = fopen ($commentfile, "a" <br> fwrite ($fp, $message); <br> fclose ($fp);<br> print "<P><B>bericht:</b></p>\n<p>$message</p><p>Toegevoegd</p>\n";<br> print "<hr><p><a href=\"". basename($PHP_SELF) . "\">Klik hier om <br>het hele board te zien</a>"; <br> } <br>else {<br> @readfile($commentfile); <br>}<br>?> <br><P><br><FORM method="post"> <br><b>Naam:</b><BR><INPUT name="name" type="text" size="55"><BR> <br><b>Bericht/opmerking:</b><BR><TEXTAREA name="message" rows=10 cols=55 <br>wrap=virtual> <br></TEXTAREA><BR> <br><INPUT name="submit" type="submit" value="Post your comments"> <br></FORM> <br>