Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Regex and output to Website

Quote Reply
Regex and output to Website
I have a database where users enter in information into an SQL database. I have noticed that when users enter in a " character it will sometimes mess up the HTML when I spit that data back out to a webpage. Is there anyway that I can have the system automatically strip the " characters when the data is submitted (silently, without generating an error).

I'm guessing it would be a regex entry... correct? What value would I want to use to do that?
Quote Reply
Re: [LanceWilson2] Regex and output to Website In reply to
Hi,

You may want to escape HTML code using:
<%escapeHTML your_field%>

You can read GT::Template doc for more information.

Cheers,
Jean
Gossamer Threads Inc.

Last edited by:

jean: Nov 19, 2003, 12:15 PM
Quote Reply
Re: [jean] Regex and output to Website In reply to
Yeah.. that seems to work. BUT I had to use the <%escape_js xxxx%> tag instead to do what I needed. But thanks for the start.