prevent HTML tags in messages

Results 1 to 2 of 2

Thread: prevent HTML tags in messages

  1. #1
    Join Date
    Dec 1969

    Default prevent HTML tags in messages

    How do sites (like 4guys for example) prevent HTML tags from being interpreted by the browser when a user puts something like:<BR><BR>&#060;HTML&#062;<BR>&#060;FONT face=tahoma color=red&#062;<BR>this would be red.<BR>&#060;/FONT&#062;<BR>&#060;/HTML&#062;<BR><BR>In there message.<BR><BR>Thanks!!

  2. #2
    Rob Guest

    Default RE: prevent HTML tags in messages

    When a message string is received, parse for tag delimiters (&#060; and &#062; signs). If found, replace with HTML less than entity or HTML greater than entity where appropriate, before storing or displaying.<BR>The entities actually show up here as symbols, but to see a list of entities available, go to:<BR>Actually, this can be done either on the server using VBScript (after form submission) or prior to form submission using JavaScript.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts