i m developing a module without using node.

i would like to allow users to input html. i would implement the filter_xss to limit the use of some tags.

but is there any function to call to validate the html input? if a user input

without

, the page will be messed up. i know there is a function to correct html code when using nodeapi. can i use it if i m not using node?

thanks a lot.

Comments

sisyphus’s picture

i found out this module. but can it be used standalone? i mean i m not going to use node table for storing record. i m not very familiar with filter.

thanks a lot

alpha2zee’s picture

Drupal filters process text content when pages are generated for display. The in-built Drupal filters can be used to restrict HTML, evaluate PHP commands, etc.

htmLawed is a substitute for Drupal's in-built HTML filter. It has more features than the latter, and has better abilities for correcting HTML. The htmLawed module also allows content-type-specific filtering; i.e., HTML restrictions can be different if the content is for a 'Page', for a user comment, etc. Unlike Drupal's filters, it also lets submissions be filtered before they get into the database itself.

The htmLawed module stores the htmLawed filter settings outside the node table, in the table for variables; it also automatically removes unused/old settings to keep that table clean.