Experimental project

This is a sandbox project, which contains experimental code for developer use only.

An API for markup language filtering in Drupal.

Synopsis

This module provides an API to let other module developers define a set of valid tags and attributes (which may be valid within the context of 1 or more tags — including a case where an attribute may be valid within all tags).

When enabled as an input filter, this module will poll all modules conforming to it's API for the set of elements and attributes which those modules define as valid, combine them into two big lists (one for attributes and one for elements), then filter out any element not in the element list and any attribute either not in the attribute list, or out of context as defined by the attribute list.

This module will allow other modules conforming to it's API to add on to it's settings form if the module wants. It will also define it's own settings.

Requirements

Roadmap

Since I wrote this module, I've realized that my approach (parsing HTML with regular expressions) is not maintainable. Regular expressions are a Regular Grammar, while HTML is a Context Free Grammar (which is fundamentally more complex). Thus, no more work will continue on the 1.x version.

This module will likely stay in beta until automated testing with SimpleTest has been implemented. If you'd like to contribute tests, please do so — see the 'Contributing' section below for more information.

I would like to add an "overrides" box to let the administrator allow or deny elements and attributes. These allow/deny rules would override anything set by other modules that conform to the Markup API.

I haven't had time to work on a Drupal 7 version yet, but I intend to do so at some time in the future.

Known problems

I don't know of any problems at this time, so if you find one, please let me know by adding an issue!

Credits

Current co-maintainers:

See the bottom of this page for a list of organizations who have supported this project.

Gittip/Flattr/Paypal

The current co-maintainers are not currently accepting donations.

However, if you are willing to pay this module's co-maintainers to work on a bug that affects your project, or add a feature you require, please contact the co-maintainers directly using the contact form on their respective Drupal.org user account pages.

Help wanted!

Maintaining a project can be a lot of work, and the current co-maintainers of this project have full-time jobs, are not paid to maintain this module, and maintain a few other projects besides this one.

More co-maintainers to help triage issues, test patches for regressions, and add features would be greatly appreciated and would help us to resolve issues faster! If you are interested in becoming a co-maintainer, please open an issue asking to become one!

  • Drupal core's Filter module was the basis for this module, but the Drupal 6 and 7 versions do not have the attribute-filtering functionality that this module has. Further, the module does not provide an API.

If you are aware of any other similar projects, please let me know by adding an issue!

Dependencies

This module does not depend on an external service (e.g. SaaS) to be fully functional.

Restrictions

This module has no artificial restrictions: the version available from Drupal.org has full functionality. No paid version is available.

Project Information