Hi,
I'm having problems removing all HTML tags that appear in the body section of posts.
Even though I've tried various configurations of the Input Filter 'HTML Filter', e.g. 'Strip disallowed tags' (when all tags have been removed from the Allow HTML Tags' field) and even escape all tags.
I've even tried the Safe HTML module, which provides an input filter for custom code
// strip consecutive spaces
$html = preg_replace("/[ ]{2,}/i", " ", $html);
Beneath which it says: "Add here code to perform additional tasks on the HTML string. You must process the $html variable in order to add additional tasks. This variable acts as input and output as well. If you are not familiar with PHP do not edit this field!"
I hope that Safe HTML module would work, but I don't know what PHP commands I could use to strip all tags.
Or am I just doing something wrong with the basic HTML filter?
Thanks,
Alex
Comments
Check the settings for the filter module
Try turning everything off all options to output the exact text that you type, with no HTML included. With further information about what you are trying to achieve others may be able to help you.
-------------------------------------------------------------------
Rick Vugteveen | Image X Media (work) | Blog (personal)
-------------------------------------------------------------------
Rick Vugteveen |rickvug.com @rickvug on Twitter
Thanks for your response. I
Thanks for your response.
I am using leech.module to pull RSS feeds from other sites and create nodes from them.
This module works great for me, except I am having a problem with some feeds which include HTML tags, such as
etc. that mess up the formatting on my site. So I want to strip these (and all) tags from the nodes that are created by leech.module.
I therefore:
- created a new input filter (called 'feed filter'), which all nodes created by leech.module are using (I've checked)
- selected the HTML filter option
- selected 'strip disallowed tags'
- removed everything from 'Allowed HTML Tags' (so as to remove everything)
- and that's it
But the
and other tags remain, even if I manually edit a node.