@strip_tags & nl2br plugin
Posted: Sun Nov 16, 2008 5:45 am
Here is my entry body created using the html editor:
<strong>Paragraph 1</strong>
<i>Paragraph 2</i>
<p>Paragraph 4</p>
1) I have am using the nl2br plugin, expecting it to insert <br />'s after each sentence and blank line above.
2) I need to strip all possible tags from the entry body.
3) I strip the entry body as follows: {$entry.body|@strip_tags|@strip}
Turns out this strip tags code actually removed the effects of the nl2br plugin. How can I strip the actual entry body tags without removing the markup added by the nl2br plugin?
<strong>Paragraph 1</strong>
<i>Paragraph 2</i>
<p>Paragraph 4</p>
1) I have am using the nl2br plugin, expecting it to insert <br />'s after each sentence and blank line above.
2) I need to strip all possible tags from the entry body.
3) I strip the entry body as follows: {$entry.body|@strip_tags|@strip}
Turns out this strip tags code actually removed the effects of the nl2br plugin. How can I strip the actual entry body tags without removing the markup added by the nl2br plugin?