I have a website that has content imported from an external source. The issue with the Content Management System used is that it adds unwanted HTML. They're currently working on a fix.
In the meantime I've come up with a simple script:
Whereby it strips all HTML apart from the tags stated in variable $b
This all works fine. The issue I have is as soon as add the Product Description field it runs, but the output is:
!!!!
Which I assume relates to the !!< and >!! in the variable declaring there's HTML in the full description.
Has anybody got any ideas how can make work? Or maybe have a better solution?
In the meantime I've come up with a simple script:
Code:
<actinic:block php="true" > $input = 'This is a test<head><br><h1></h1>'; $a = strip_tags($input); $b = strip_tags($input, "<br><ul><li>"); echo $b; </actinic:block>
This all works fine. The issue I have is as soon as add the Product Description field it runs, but the output is:
!!!!
Which I assume relates to the !!< and >!! in the variable declaring there's HTML in the full description.
Has anybody got any ideas how can make work? Or maybe have a better solution?
Comment