You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sanitize markup by adding, changing or removing tags, using the xrb stream processor (which has a naive C implementation).
Motivation
I use the sanitize gem and generally it's great. However, it's performance can be an issue and additionally, it doesn't preserve tag namespaces when parsing fragments due to how Nokogiri works internally. This is a problem when processing content destined for utopia since it heavily depends on tag namespaces.
Is it fast?
In my informal testing, this gem is about ~50x faster than the sanitize gem when generating plain text.
Getting Started - This guide explains how to get started with the XRB::Sanitize gem.
Contributing
We welcome contributions to this project.
Fork it.
Create your feature branch (git checkout -b my-new-feature).
Commit your changes (git commit -am 'Add some feature').
Push to the branch (git push origin my-new-feature).
Create new Pull Request.
Developer Certificate of Origin
This project uses the Developer Certificate of Origin. All contributors to this project must agree to this document to have their contributions accepted.
Contributor Covenant
This project is governed by the Contributor Covenant. All contributors and participants agree to abide by its terms.
About
Sanitize markup by adding, changing or removing tags.