sfValidatorHtmlPlugin - 0.1.3

The 'sfValidatorHtmlPlugin is a symfony plugin that provides validation of sting with embedded HTML code.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source | Show as Markdown

sfValidatorHtmlPlugin

The 'sfValidatorHtmlPlugin is a symfony plugin that provides validation of sting with embedded HTML code.

Installation

Install the plugin

    php symfony plugin-install sfValidatorHtml --release=0.1.3

Clear yout cache

    symfony cc

Usage

This validator extends standart symfony sfValidatorString validator and provides two new parameters:

  • level. This parameter means level of HTML code which is allowed in string. Acceptable values are:

    • 'nohtml'. No html is allowed
    • 'inlines'. Only inline HTML elements are allowed
    • 'block'. All html elements are allowed. List of allowed elements for each level is incapsulated in sfValidatorHtml class.
  • cleaner. This parameter defines which cleaner should be used. Acceptable values are:

    • 'jevix'. jevixCleaner class will be used
    • 'tidy'. tidyCleaner class will be used

Default values are:

  • 'level' => 'nohtml'
  • 'cleaner' => 'jevix'

TODO

  • Extend rules for Jevix
  • Fix bug in Jevix with autoadding attributes

History

0.1.3 Enlightened: fixed typos in documentation

0.1 initial release