Skip to main content
Inspiring
April 23, 2008
Question

Database content wrecking pages

  • April 23, 2008
  • 2 replies
  • 270 views
I am using ColdFusion to allow a client to enter content into the database which is then used for the display of information such as a story or song description. When the clients enter the information they can add double quotes or extra spaces that can wreck the page when the information is pulled back out and displayed. How can I catch and change the unwanted characters before they go into the database?

Something to do with "parsing", maybe.

Any help is appreciated,


ben
    This topic has been closed for replies.

    2 replies

    Inspiring
    April 30, 2008
    Dan,

    That worked well and has become a staple in my code chest already. Thank you so much.

    iam bennu
    Inspiring
    April 23, 2008
    My suggestion is to store what you are given and worry about the display when you have to do so. It may not be on a web page.

    The gist of your question suggests that regular expressions are part of the answer. Cold Fusion has a few functions that incorporate this concept. One of them is called REreplace.
    Inspiring
    April 23, 2008
    Thank you,

    I will look it up. I new there was something availible.

    Your time and knowledge is appreciated,

    iam