Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Bug with " characters in txt fields.

Quote Reply
Bug with " characters in txt fields.
hi,

have just tested the demo on the gt site to confirm this.

when adding link, if a user enters this into the title field (or any other text field for that matter):

The title of my site "is this".

the text will be chopped off at the first " character if the page is returned with an error. for eg. the returned field would read:

The title of my site

not sure if there's a way around this - i'm sure i've done it soemwhere but can't find it.

cheers,
r.

Last edited by:

ryel01: May 16, 2002, 5:53 PM
Quote Reply
Re: [ryel01] Bug with " characters in txt fields. In reply to
 
a quick fix could be to just to remove all " characters from the data that's posted in the get_form_data function...

Code:
if ( get_magic_quotes_gpc() ) {
foreach ($data as $key => $val) {
$val = stripslashes( trim($val) ); # strip any slashes.
$data[$key] = ereg_replace('"', '', $val); # remove any " characters from input.
}
}


What do you think?

regan.

Last edited by:

ryel01: May 16, 2002, 7:05 PM