0.0
Low commit activity in last 3 years
No release in over a year
Terminate Active Records fields of html
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2.0
>= 0

Runtime

~> 6.0.0
 Project Readme
                          _ _
      r┐               ,r:ー'´.::.:: .:..`ヽ、
      |i |                f´.::.,__.:::::..::::::::::::::ヽ
      |l |              チr'´    ̄ ̄ヾ;::.:.|
     ,r1|              キ| __ '´ __  l;::..l
     |l ||              }撻鬱ij!'徼i匐}レ''1
     |lr' i|               f{`~゛ツ; ヾ~´ iノ}|
     ||l l|                ぃ  ´'_`   Y´
     ||| l|                ト、 ´ ̄ ` ,ィ{
     ||| i|                    | `ー-‐ '  }`iー -- 、
     ||| l|                ,! i   / ノ  l _,シ ム
     ||| l|               〃ト、_,,,. ;i'メ  |/ ,/  \
    |! ∥             //lliiiiiiiiiiiiiiiill/{r―‐^ i〃/    ヽ
    |l ∥            / ,イllliiiiiiiiiiiiillll/´  /r- ゝ  '     l
    || ∥           / /´フliiiiiiiiiilllll/ ,  /   |/    |
     jlj l|           / ir'    |liiiiiiiilllllli'  /    |   ーイ、
    ム- 、|          ハ |,    /iiiiillllllllll|  /      |      i
    ノ   `i        / lj   /llllllllllllllllll{/       l      |
    ヽ   /          l |  /llllliillllllllllllll|         |       |
   、r┤ ,ム、        | ヽ|  /lliiiiiiiiiillllllllllll}          |      |
   '{ヽ'r_'__ i         〉  l |iiiiiiiiiiiiiiilllllllllll|        | 、    |
   /〉ー-{ ソト 、     /   ||iiiiiiiiiiiiiiiiiillllllll!、       |  二   |
   しt_;ュ',//   ヽ、 /    | |iiiiiiiiiiiiiiiiiiiiillllllヽ、       |    ` |
    (_,イー'      ´     | |iiiiiiiiiiiiiiiiiiiiiiiiiiiiiillヽ、     ||    ヽ |
     └-、   ノ´        | |iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii|     ||      |

HtmlTerminator

Build Status

Visits Active Record fields and terminates unsafe HTML.

Installation

Add this line to your application's Gemfile:

gem 'html_terminator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install html_terminator

Usage

In your Rails models:

terminate_html :field1, :field2, :field3

Options

Out of the box, HTML Terminator will strip out ALL html. You can pass in specific elements you want to preserve like this:

terminate_html :field1, :elements => ["b", "i", "em"]
terminate_html :field2, :elements => ["br"]
terminate_html :field3, :elements => ["em"]

Learn more about configuration options Here

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request