mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
09cbd6c65e628d5fdf15accefae2bd3968fbb54d
Sanitizing HTML/Markdown means parsing the content into an HTML tree under‐the‐hood anyway, and it is more accurate to do mention/hashtag replacement on the text nodes in that tree than it is to try to hack it in with regexes et cetera. This undoes the overrides of `#entities` and `#rewrite` on `AdvancedTextFormatter` but also stops using them, instead keeping track of the parsed Nokogiri tree itself and using that in the `#to_s` method. Internally, this tree uses `<mastodon-entity>` nodes to keep track of hashtags, links, and mentions. Sanitization is moved to the beginning, so it should be known that these do not appear in the input.
…
…
…
…
…
…
Prevent translations from accidentally becoming completely different from source strings on Crowdin without translators noticing. (#17085)
…
…
Mastodon Glitch Edition
Now with automated deploys!
So here's the deal: we all work on this code, and anyone who uses that does so absolutely at their own risk. can you dig it?
- You can view documentation for this project at glitch-soc.github.io/docs/.
- And contributing guidelines are available here and here.
Languages
Ruby
49%
TypeScript
23.8%
JavaScript
17.2%
SCSS
6.5%
Haml
3.2%
Other
0.3%