fix(images): encode the source handed to a media element - #26
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
=======================================
Coverage 84.91% 84.91%
=======================================
Files 36 36
Lines 2460 2460
Branches 501 502 +1
=======================================
Hits 2089 2089
Misses 368 368
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
skjnldsv
force-pushed
the
fix/encoded-source
branch
from
September 10, 2026 16:27
300d978 to
886465e
Compare
`useViewerProps` builds an encoded source for exactly this reason, and three places went around it: the image element for a file with no preview, the video element of a live photo, and the editor's own `src`. A name holding a `#` cuts the URL short there and the file fails to load; the fallback of the first is a hand fetch, the other two just stay empty. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
skjnldsv
force-pushed
the
fix/encoded-source
branch
from
September 10, 2026 17:05
886465e to
53efccb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
useViewerPropsbuilds an encoded source so that "special characters in the name don't break the media element'ssrcURL", and three places went around it and usedfile.sourcedirectly: the image element for a file with no preview (Images.vue), the video element of a live photo, and the editor'ssrc(ImageEditor.vue, whose save request already usedencodedSource).A name holding a
#cuts the URL short there:The image then fails to load and falls back to a hand fetch; the live photo and the editor just stay empty.
Four tests, all failing before: the
getPreviewIfAny()fallback, the image element, the live-photo video element, and the editor'ssrc.mediaPreloaderstill passesfile.sourceto the webdav client, which encodes it itself, so that one is left alone.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.