Stripping HTML tags from SQL Table

  • I designed a form that has an HTML editor associated with it.  The content in the editor is stored in a SQL table as "Long Text".  When I create a page to display the data stored in the table, the HTML tags are also displayed.  

    Question:  Is there away to strip the HTML tags in the table before it is displayed in a web page?

  • Do you have to store the HTML tags in the first place would be my question???

    I had a similar problem, but I used regular expressions in the frontend to strip the code from HTML tags before it was stored in the DB - of course certain tags such as <br> and <p> were substituted as to keep an overall structure of the document but all other format were regulated by CSS ...

    If you need to store the tags you could always strip the code from the tags before displaying it ...

    nano

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply