No commit activity in last 3 years
No release in over 3 years
A relaxed configuration for Sanitize supporting deprecated, but still commonly-used, HTML tags
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 4.0
 Project Readme

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.