Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. How to handle HTML comment chars ( i.e. "<!--" ) in TEXTBOX

How to handle HTML comment chars ( i.e. "<!--" ) in TEXTBOX

Scheduled Pinned Locked Moved Web Development
htmlhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arindam Tewary
    wrote on last edited by
    #1

    Hi , I have a textbox where user is allowed to enter some text value. Now the problem is when user is entering "

    J 1 Reply Last reply
    0
    • A Arindam Tewary

      Hi , I have a textbox where user is allowed to enter some text value. Now the problem is when user is entering "

      J Offline
      J Offline
      Johnny
      wrote on last edited by
      #2

      You need to escape the contents of the input box. I'm not sure which language you are using but, for example, in PHP you would use the htmlspecialchars function:

      There will be something similar in most other systems.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups