Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Remove the quote-inline class from statuses #2867

Open
GeopJr opened this issue Apr 25, 2024 · 5 comments
Open

[feature] Remove the quote-inline class from statuses #2867

GeopJr opened this issue Apr 25, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@GeopJr
Copy link

GeopJr commented Apr 25, 2024

Is your feature request related to a problem ?

When *oma, *key(?) and treehouse.systems mastodon do a quote post, they wrap RE: <link> in a span with the class quote-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 original

Describe 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: ... sentence

Additional context.

GeopJr/Tuba#926

@GeopJr GeopJr added the enhancement New feature or request label Apr 25, 2024
@tsmethurst
Copy link
Contributor

tsmethurst commented Apr 26, 2024

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.

@daenney
Copy link
Member

daenney commented Apr 26, 2024

I think there's an example in GeopJr/Tuba#926 (comment), if you expand the "Details" thingy.

@tsmethurst
Copy link
Contributor

Oh OK, we could probably just add that to our sanitizer then.

@GeopJr
Copy link
Author

GeopJr commented Apr 26, 2024

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!

@tsmethurst
Copy link
Contributor

Got it, thanks for the extra detail 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants