No description
  • HTML 82.1%
  • Elixir 17.9%
Find a file
lain f44de1eb5e Merge branch 'update-fast-html' into 'master'
Update fast_html dependency

See merge request pleroma/elixir-libraries/fast_sanitize!2
2021-12-15 17:34:26 +00:00
bench_fixtures Have a separate env for benchmarks and move fixtures into a directory 2019-11-08 22:02:29 +03:00
config config: only use warning log level when running tests 2019-05-16 18:36:47 +00:00
lib Fragment: fast_html 2.0 compatibility 2020-07-15 23:35:23 +03:00
test Alter half-open script test expectation 2020-07-15 23:01:28 +03:00
.formatter.exs initial commit 2019-05-16 15:40:13 +00:00
.gitignore initial commit 2019-05-16 15:40:13 +00:00
.gitlab-ci.yml CI: install cmake since that's now required for fast_sanitize 2020-08-06 10:41:37 +03:00
CHANGELOG.md fast_sanitize 0.2.1 2020-08-26 16:22:52 +03:00
LICENSE Add a license 2019-10-28 22:45:22 +03:00
mix.exs Update fast_html dependency 2021-12-15 12:18:54 -05:00
mix.lock Update fast_html dependency 2021-12-15 12:18:54 -05:00
README.md fill in the details with the README 2019-11-06 13:01:19 -06:00

FastSanitize

A high performance HTML sanitization library built on FastHTML, our rewrite of Myhtmlex. It was created to improve HTML sanitization performance in Pleroma, a high-performance, versatile federated social networking platform.

Features

  • Meta-programming: build your own scrubbing policies with macros, mostly compatible with HtmlSanitizeEx.
  • Performance: on average, 2-3 times faster than HtmlSanitizeEx with typical documents with considerably less memory usage.
  • Uses the MyHTML parsing engine which parses HTML in the same way browsers do.
  • Uses an efficient AST for scrubbing HTML nodes and Erlang iolists for efficient HTML generation.

Installation

The package can be installed by adding fast_sanitize to your list of dependencies in mix.exs:

def deps do
  [
    {:fast_sanitize, "~> 0.1.0"}
  ]
end

Docs can be found at https://hexdocs.pm/fast_sanitize.