Gustav Brock
Gustav at cactus.dk
Thu Nov 29 05:38:23 CST 2007
Hi Erwin Just curious, why wouldn't this control fit your purpose? To me it seems exactly what you are looking for but I may be missing something. <quote> The Chilkat ASP String Component is freeware and may be used in any ASP application. To install, download and unzip the ASP String Component. Then copy the CkString.dll to a directory on your ASP Web Server and register it with regsvr32.exe. The CkString.dll is a standard ActiveX component. It may also be used in Visual Basic 6.0, Delphi, Cold Fusion, Visual FoxPro, PowerBuilder, MFC, or any other programming language that supports ActiveX components. </quote> http://www.example-code.com/asp/aspstring.asp Example code here: <snip> set cks = Server.CreateObject("CkString.CkString") ' Strip HTML from a string. cks.Str = "<html><body><p>This is a test<br>Here is a <a href=""http://www.chilkatsoft.com"">test link</a></p></body></html>" cks.StripHtml ' Prints "This is a testHere is a test link" Response.Write cks.Str + "<br>" ' Perhaps it's better to replace <br> tags with SPACE chars first... cks.Str = "<html><body><p>This is a test<br>Here is a <a href=""http://www.chilkatsoft.com"">test link</a></p></body></html>" cks.ReplaceAll "<br>"," " cks.ReplaceAll "<BR>"," " cks.StripHtml ' Prints "This is a test Here is a test link" Response.Write cks.Str </snip> /gustav >>> Erwin.Craps at ithelps.eu 28-11-2007 20:40 >>> I already have the process automated, but I see that HTML code get's into my database. Things like <DIV> <b> color etc. Some stuff I already replace/remove like <br> I just want plain simple text in this case.