Open GeopJr opened 4 months ago
Could you give an example? It's not totally clear from the issue what's being removed, what's not being removed, and what should be kept.
I think there's an example in https://github.com/GeopJr/Tuba/issues/926#issuecomment-2078222655, if you expand the "Details" thingy.
Oh OK, we could probably just add that to our sanitizer then.
Yep, I'll include it here too:
GTS:
<span class="h-card"><a class="u-url mention" href="https://queer.party/@yavien" rel="ugc nofollow noreferrer noopener" target="_blank">@<span>yavien</span></a></span> seconded from my own personal experience<span class="quote-inline"><br><br>RE: <a href="https://queer.party/users/yavien/statuses/112333867184539778" rel="nofollow noreferrer noopener" target="_blank">https://queer.party/users/yavien/statuses/112333867184539778</a></span>
Mastodon:
<span class="h-card"><a class="u-url mention" href="https://queer.party/@yavien" rel="nofollow noopener noreferrer" target="_blank">@<span>yavien</span></a></span> seconded from my own personal experience<span class=""><br><br>RE: <a href="https://queer.party/users/yavien/statuses/112333867184539778" rel="nofollow noopener noreferrer" target="_blank">https://queer.party/users/yavien/statuses/112333867184539778</a></span>
diff:
- experience<span class=""><br><br>RE: <a href=
+ experience<span class="quote-inline"><br><br>RE: <a href=
edit:
I want quote-inline
to be sanitized until (or if) GoToSocial adds quote support. That class is used by AP servers that support quotes to indicate what elements are included for compatibility with clients that do not support displaying the quoted posts.
So in the case of Tuba, since we do display quoted posts when provided, we remove any elements that have the quote-inline
class. From our side, we will now also check if a quoted post is provided at all before removing those elements but other clients might not do that so it's better if GTS just sanitizes that, like Mastodon does!
Got it, thanks for the extra detail :+1:
Is your feature request related to a problem ?
When *oma, *key(?) and treehouse.systems mastodon do a quote post, they wrap![](https://github.com/superseriousbusiness/gotosocial/assets/18014039/636eb8e1-6aa0-4ea2-8762-931a9fb2c6e7)
RE: <link>
in a span with the classquote-inline
, so clients hide that line if they support quote posts. GTS seems to be keeping them while removing the quote, ending up in quotes without a link to the originalDescribe the solution you'd like.
quote-inline
gets removed until quotes get implemented (if at all)Describe alternatives you've considered.
From my client's side, I'll check if there's a quote property available before removing the
RE: ...
sentenceAdditional context.
https://github.com/GeopJr/Tuba/issues/926