This repository has been archived on 2023-07-01. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app
kibigo! 09cbd6c65e
Use a tree‐based approach for adv. text formatting
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.
2022-11-08 21:34:16 -08:00
..
chewy Change algorithm of tootctl search deploy to improve performance (#18463) 2022-05-22 22:16:43 +02:00
controllers Merge branch 'main' into glitch-soc/merge-upstream 2022-11-07 19:53:30 +01:00
helpers Merge branch 'main' into glitch-soc/merge-upstream 2022-11-06 09:50:41 +01:00
javascript [Glitch] Fix redrafting a currently-editing post not leaving edit mode 2022-11-08 16:26:25 +01:00
lib Use a tree‐based approach for adv. text formatting 2022-11-08 21:34:16 -08:00
mailers Add support for language preferences for trending statuses and links (#18288) 2022-10-08 16:45:40 +02:00
models Merge branch 'main' into glitch-soc/merge-upstream 2022-11-08 15:44:57 +01:00
policies Merge branch 'main' into glitch-soc/merge-upstream 2022-10-28 19:23:58 +02:00
presenters Change sign-in banner to reflect disabled or moved account status (#19773) 2022-11-05 18:28:13 +01:00
serializers Merge branch 'main' into glitch-soc/merge-upstream 2022-11-06 09:50:41 +01:00
services Merge branch 'main' into glitch-soc/merge-upstream 2022-11-08 15:44:57 +01:00
validators Merge branch 'main' into glitch-soc/merge-upstream 2022-10-30 18:15:28 +01:00
views Merge branch 'main' into glitch-soc/merge-upstream 2022-11-08 15:44:57 +01:00
workers Merge branch 'main' into glitch-soc/merge-upstream 2022-11-07 19:53:30 +01:00