Henri Dickson
5267e4108c
Allow unicode characters in hashtag ( #659 )
2023-11-19 09:58:20 -07:00
Andrew Godwin
dd532e4425
Fix tests for profile redirect and add to notes
2023-09-07 22:06:50 -06:00
TAKAHASHI Shuuji
f88ad38294
Prepend invisible URL protocol prefix ( #586 )
2023-05-26 09:02:49 -06:00
TAKAHASHI Shuuji
2040124147
Prevent dropping ellipsis URL ( #585 )
2023-05-24 11:41:56 -06:00
Andrew Godwin
f4bbe78bd5
Fix tests after mentions change
2023-05-13 11:19:23 -06:00
Christof Dorner
9775fa8991
Add mention
class to user mention links ( #575 )
...
This should fix mention links in Elk to keep linking inside Elk, not to the instance of the mentioned user.
2023-05-09 09:55:19 -06:00
Andrew Godwin
1994671541
Correctly handle GTS mentions of same username
...
Fixes #546
2023-03-22 10:44:15 -06:00
Humberto Rocha
e625fae13d
Fix hashtag being handled as common link in the preview card ( #515 )
2023-02-19 20:35:54 -07:00
Andrew Godwin
a6922cb9d6
Move to a new HTML parser/stripper
...
This removes the use of the EOL'd Bleach, and also integrates hashtag,
mention and emoji searching into one single place.
2023-01-29 17:47:06 -07:00
Michael Manfre
cc75863b8f
Fixes #431 - Preserve href when stripping <a> tags ( #436 )
2023-01-17 23:41:33 -07:00
Michael Manfre
9b6ceee490
Apply Mastodon style link text shortening ( #426 )
2023-01-16 11:59:46 -07:00
Corry Haines
cfe18932b8
Match sanitizing for posts to Mastodon ( #422 )
...
Creates filter for REWRITTEN_TAGS that converts them to `p` rather than ripping them out entirely, and formats `ul` as break-separated list
Both changes align sanitization to Mastodon's "strict" sanitizer at https://github.com/mastodon/mastodon/blob/main/lib/sanitize_ext/sanitize_config.rb#L73
I don't love the complexity of the Filter, but Bleach doesn't give us great options to work with. The code operates within an iterator without the useful "sibling" methods that Ruby's equivalent has. Also, Bleach runs filters _after_ sanitizing (unlike Ruby's which runs before) so we have to pass all the elements through the sanitizer, then rewrite them after the fact.
2023-01-15 22:32:04 -07:00
Michael Manfre
50c07f491e
Guard Post mentions processing from unfetched Identities ( #272 )
2022-12-25 14:37:31 -07:00
Michael Manfre
ab398758a9
Fixed mention linking with mixed case usernames ( #265 )
2022-12-24 21:04:25 -07:00
Andrew Godwin
025fd5cf07
Emoji refactor
...
Emojis are now prefetched from the post, and if not, looked up
individually by shortcode, to prevent loading hundreds.
2022-12-22 16:55:31 +00:00
Andrew Godwin
51d34eda9c
Significantly better hashtag link parsing
...
Fixes #203
2022-12-20 13:55:14 +00:00
Andrew Godwin
78d2283458
Move linkifying to all http-prefixed links
2022-12-20 13:21:50 +00:00
Andrew Godwin
4ad4f468a4
Refactor HTML rendering into one place
...
Also suppress using external <a> tags for now, until we can separate
them from hashtags properly.
2022-12-20 11:39:45 +00:00
Andrew Godwin
fb342cfb54
Fix hashtagging of HTML entities
2022-11-28 22:34:14 -07:00
Andrew Godwin
8e9e3ecf69
Some cleanup around editing
2022-11-27 12:09:08 -07:00