https://github.com/komposable/sanitize_rich_text
https://github.com/komposable/sanitize_rich_text
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/komposable/sanitize_rich_text
- Owner: komposable
- License: mit
- Created: 2017-06-20T16:02:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-20T18:40:57.000Z (over 8 years ago)
- Last Synced: 2026-05-12T16:22:26.149Z (2 months ago)
- Language: Ruby
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SanitizeRichText
[](https://travis-ci.org/komposable/sanitize_rich_text)
## Installation
```rb
gem 'sanitize_rich_text'
```
## Usage
```rb
class Article < ApplicationRecord
sanitize_rich_text :text, elements: %w(h2 h3 p a), attributes: { 'a' => ['href', 'target'] }
end
```