forked from glitch-soc/mastodon
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow MathML Core tags in post content
See mastodon#19806 for more info. Test Plan: ---------- ``` $ RAILS_ENV=test bundle exec rspec spec/lib/sanitize_config_spec.rb -f d Randomized with seed 26282 Sanitize::Config ::MASTODON_OUTGOING keeps a with href and rel tag, not adding to rel or target if url is local behaves like common HTML sanitization removes a with unsupported scheme in href removes a with unparsable href keeps math keeps ul removes a without href and only keeps text content removes a without href keeps a with href keeps a with translate="no" removes "translate" attribute with invalid value keeps h1 does not re-interpret HTML when removing unsupported links keeps title in abbr keeps start and reversed attributes of ol keeps a with supported scheme and no host correctly sanitizes linethickness Finished in 0.61166 seconds (files took 4.76 seconds to load) 16 examples, 0 failures Randomized with seed 26282 ``` observed 100% code coverage of lib/sanitize_ext/sanitize_config.rb. See mastodon#19806, glitch-soc#1432
- Loading branch information
1 parent
0bbf7cf
commit 7623acf
Showing
2 changed files
with
93 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters