Hi David,
I have put a STRIP HTML filter to my product descriptions and allowed just tags. But it does not work. Could you please check it at the following URL: {link saved}
Cheers,
Kempo
Hi David,
Thank you very much for the information of the reason of not working. Instead of search and replace I wrote the following filter and now it works as I exactly want:
/*************************************************/
/* HTML ENTITY DECODE */
/*************************************************/
$filter_names["EntityDecode"] = "HTML Entity Decode";
function filter_EntityDecodeConfigure($filter_data)
{
print "<p>There are no additional configuration parameters for this filter.</p>";
}
function filter_EntityDecodeValidate($filter_data)
{
}
function filter_EntityDecodeExec($filter_data,$text)
{
return html_entity_decode($text);
}
Cheers,
Kempo
Hi Kempo,
The problem is that the HTML is actually entity encoded within the feed; which is why it appears as literal HTML on your pages rather than being interpreted as actual HTML.
To fix this, first remove the Strip HTML filter, and insert 2 Search and Replace filters on the Description field as follows:
Search:
<
Replace:
<
Search:
>
Replace:
>
And then finally your Strip HTML filter:
Allowable Tags:
As filters are applied in the order that they were created; the above will have the effect of first first turning the entity encoded HTML back into "normal" HTML, and then Strip Tags should work...!
Cheers,
David.
--
PriceTapestry.com