- strip_tags: documentation ( source)
<?php
/*
it('should account for ending type in allowable tags when specified as a string', function() {
+ var html = '<article>lorem ipsum<br> dolor<br /> sit</article>',
+ allowedTags = '<br>',
+ text = 'lorem ipsum<br> dolor sit';
+
+ assert.equal(striptags(html, allowedTags), text);
+ });
*/
$html = '<article>lorem ipsum<br> dolor<br /> sit</article>';
$allowedTags = '<br>';
$text = 'lorem ipsum<br> dolor sit';
echo strip_tags(html, allowedTags) === text ? 'equal' : 'not equal';