You are not logged in.
Pages: 1
Hello!
I'm having issues with a footer credit description from text into HTML. Currently the site has the footer description as Text Area type and I created a new feature with a HTML Area field type. However, the Html type is not appearing within the paragraph tag with the .credit class and it adds extra paragraph tags. Please see the attached screenshot: https://imgur.com/a/P5JHj51.
Would anyone help or suggest how to fix the problem?
Thanks,
Offline
So if you’re outputting the Simple (or non-simple) HTML field into a <p> tag it’s going to have a nested <p> which is going to cause issues for you. If you want to allow certain tags but not others you could use strip_tags on the value. An example that only allows links, bold, and italic:
<p class=“credit”><?=strip_tags($value, “<em><strong><a>”)?></p>Note that the code above is getting fancy quotes because I’m on my iPad and it’s being silly. You obviously wouldn’t use fancy quotes in the code ![]()
Offline
Thanks for the help!
Offline
Pages: 1