Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Database content wrecking pages

Explorer ,
Apr 23, 2008 Apr 23, 2008
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
253
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 23, 2008 Apr 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 23, 2008 Apr 23, 2008
Thank you,

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

Your time and knowledge is appreciated,

iam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2008 Apr 30, 2008
LATEST
Dan,

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

iam bennu
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources