Skip to content

Relaxed Sanitize config supporting deprecated tags and attributes

License

Notifications You must be signed in to change notification settings

considerhq/sanitize_with_deprecated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sanitize with Deprecated

This is an extension to Sanitize. Even in its most permissive built-in configuration, Sanitize will still strip deprecated HTML elements like <center> and <font>.

However, such elements remain commonly used, in contexts like email templates.

This gem introduces an additional config, Sanitize::Config::RELAXED_WITH_DEPRECATED, which will not strip a custom list of still-commonly-used deprecated elements.

Installation

Add this line to your application's Gemfile:

gem 'sanitize_with_deprecated'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sanitize_with_deprecated

Usage

Use the exposed Sanitize::Config::RELAXED_WITH_DEPRECATED configuration constant as described in sanitize’s documentation.

Other than adding a few additional tags, it’s exactly the same as Sanitize::Config::RELAXED.

About

Relaxed Sanitize config supporting deprecated tags and attributes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages