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

How to stop html injection

New Here ,
Dec 15, 2006 Dec 15, 2006

Copy link to clipboard

Copied

Hi, I have a form that has a input box for a name. The user can put in anything they want, I even allow them to put in something like '<input name=lastNametype='text'></input>'. My question is how can I decode or encode this html so that when I display this text it will not display a text box but instead just display the text '<input name=lastNametype='text'></input>' Any sample code of this?

Thank you so much for your help,
C
TOPICS
Advanced techniques

Views

594

Translate

Translate

Report

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
Guest
Dec 15, 2006 Dec 15, 2006

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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
New Here ,
Dec 15, 2006 Dec 15, 2006

Copy link to clipboard

Copied

Awesome CJ !, Thank you so much. I'm new to coldfusion, I'm just wondering how I can find functions like this or learn more about various other subjects like this, I tried searching in Google: "Coldfusion html injection" and didn't find anything like this, what is a better way to do research next time in your opinion?

Thanks so much,
C

Votes

Translate

Translate

Report

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
Guest
Dec 15, 2006 Dec 15, 2006

Copy link to clipboard

Copied

the livedocs have all of the functions broken down by category. that's generally the easiest way to find the function you're looking for:

http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000354.htm

(if the function you're looking for doesn't exist, the next stop would generally be http://www.cflib.org )

Votes

Translate

Translate

Report

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
New Here ,
Dec 15, 2006 Dec 15, 2006

Copy link to clipboard

Copied

LATEST
Hi CJ, thanks again for all your help.

Thank you,
C

Votes

Translate

Translate

Report

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
Documentation