Slightly improve the media experience #452
Geen beoordelaars
Labels
Geen label
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
Geen mijlpaal
Geen project
Niet toegewezen
2 deelnemers
Notificaties
Vervaldatum
Geen vervaldatum ingesteld.
Afhankelijkheden
Geen afhankelijkheden ingesteld.
Referentie: Plume/Plume#452
Laden…
Tabel toevoegen
Verwijs in een nieuwe issue
Geen beschrijving gegeven.
Branch "better-media" verwijderen
Het verwijderen van een branch is permanent. Hoewel de verwijderde branch kan blijven bestaan voor een korte tijd voordat het daadwerkelijk wordt verwijderd, kan het in de meeste gevallen NIET ongedaan gemaakt worden. Wilt u doorgaan?
Here are some screenshots:
Fixes #432
Codecov Report
It feel a bit odd there are nice pictures for non image files on
/media
, but not on/media/<id>
, otherwise this is all goodI'm not a big fan off allowing custom class, peoples could inject div/a with the right classes to mess up the interface. I'd prefer maybe an "unsafe" (not necessary in the sens of rust's unsafe) builder for SafeString, with the contract that things put in it must already be trusted
the alt and title can't be trusted (and trusted is unnecessary here)they are actually escaped, but url might be partially untrustedtitle can't be trusted. I don't know how to handle this one. Maybe have some way of concatenating SafeString, and doconcat(trusted("<div></div>"),new("<audio/>"))
title is actually escaped, but url might be partially untrusted atm
title can't be trusted (and would be unnecessary here if we keep video/audio allowed)title is actually escaped, but url might be partially untrusted atm
@ -22,3 +22,3 @@
.add_tags(iter::once("iframe"))
.add_tags(&[ "iframe", "video", "audio" ])
.id_prefix(Some("postcontent-"))
.url_relative(UrlRelative::Custom(Box::new(url_add_prefix)))
I think we should keep video and audio tags, So that people can insert media content in their posts
👍