1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Parsing HTML tags from database field

Discussion in 'XenForo Development Discussions' started by BamaStangGuy, Aug 19, 2013.

  1. BamaStangGuy

    BamaStangGuy Well-Known Member

    I have content in a database field that I am pulling out and putting into an external page that already had html tags in it formatting the content the way I want. However, when I query and pull out the data the html tags show up as plain text. How can I get the page to parse the html tags that are in the database?
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    You will most likely need to do htmldecode() on it since I believe it's converted to the encoded equivalents in the database.
    BamaStangGuy likes this.
  3. Chris D

    Chris D XenForo Developer Staff Member

    If you want to parse that HTML in a template use:

    {xen:raw $var}
    BamaStangGuy and Jeremy like this.
  4. BamaStangGuy

    BamaStangGuy Well-Known Member

    That worked. Thanks

Share This Page