RE: [PHP] XHTML Validation problem
Begin forwarded message: >> I have a page that displays data entered by the user. There is one >> user that entered the character "&" inside the text he typed. For >> this case the xhtml validation fails and gives me the following >> error: >> "character "&" is the first character of a delimiter but occurred >> as data." >> >> I'm wondering if there is a way to avoid this error. The page >> itself is valid and fails just in the case the user enters the & >> character. Try replacing the '&' character with ' '. That is what I did to get rid of that warning in my xhtml documents. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: [PHP] XHTML Validation problem
Forgot to reply all Begin forwarded message: From: Simon Welsh <[EMAIL PROTECTED]> Date: 3 May 2008 4:18:04 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] XHTML Validation problem On 3/05/2008, at 4:13, It Maq wrote: Hi, I have a page that displays data entered by the user. There is one user that entered the character "&" inside the text he typed. For this case the xhtml validation fails and gives me the following error: "character "&" is the first character of a delimiter but occurred as data." I'm wondering if there is a way to avoid this error. The page itself is valid and fails just in the case the user enters the & character. Thank you Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Pass the input through htmlspecialchars(). --- Simon Welsh Admin of http://simon.geek.nz/ Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e --- Simon Welsh Admin of http://simon.geek.nz/ Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XHTML Validation problem
html_entities() http://ca.php.net/manual/en/function.htmlentities.php Hope this helps - Craige On Sat, May 3, 2008 at 12:13 AM, It Maq <[EMAIL PROTECTED]> wrote: > Hi, > > I have a page that displays data entered by the user. There is one user that > entered the character "&" inside the text he typed. For this case the xhtml > validation fails and gives me the following error: > "character "&" is the first character of a delimiter but occurred as data." > > I'm wondering if there is a way to avoid this error. The page itself is > valid and fails just in the case the user enters the & character. > > Thank you > > > > > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XHTML Validation problem
Hi, I have a page that displays data entered by the user. There is one user that entered the character "&" inside the text he typed. For this case the xhtml validation fails and gives me the following error: "character "&" is the first character of a delimiter but occurred as data." I'm wondering if there is a way to avoid this error. The page itself is valid and fails just in the case the user enters the & character. Thank you Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php