Stripping HTML tags

Results 1 to 5 of 5

Thread: Stripping HTML tags

  1. #1
    Join Date
    Dec 1969

    Default Stripping HTML tags

    I have seen an article about this somewhere and now I can&#039;t find it.<BR><BR>Could someone point me in the right direction either site or just tips on how to strip HTML tags from a string using ASP.<BR><BR>Thanks<BR><BR>Stan

  2. #2
    RDM Guest

    Default RE: Stripping HTML tags

    Replace(sVar,"&#060;TD&#062;","")<BR><BR>If you need something more advanced, you may have to iterate through the string comparing characters.

  3. #3
    Medieval Dude Guest

    Default RE: Stripping HTML tags

    But that would only strip out all &#060;TD&#062; tags. I don&#039;t think that would help much.

  4. #4
    Eddie Campbell Guest

    Default RE: Stripping HTML tags

    I think that the best way would be to find the first occurrence of &#060; in the text using Instr and then find the matching &#062;. It would then be quite simple to remove anyhing between those 2 positions. You would need to stick this in a loop so as to remove all tags.<BR><BR>One problem with this would be if the string contained &#060; or &#062; in the text where they were NOT part of an HTML tag.

  5. #5
    RDM Guest

    Default Just a small example of Replace

    chuckle...You are definitely right about that. Hey weren&#039;t clear just advanced they needed to be.

Posting Permissions

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