forgejo/web_src
forgejo-backport-action 5095cafe49 [v12.0/forgejo] fix: correct image source for quoted reply (#8574)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/8565

- Since v10 replies are generated on the fly to handle quoted reply (forgejo/forgejo#5677), this means that we have to do some work to construct markdown that is equivalent to the HTML of the comment.
- Images are slightly strange in the context of issues and pull requests, as Forgejo will render them in the context of the repository and as such links such as `/attachments` become `/user/repo/attachments`, the quoted reply did not take into account and would use `/user/repo/attachments` as link which means it gets transformed to `/user/repo//user/repo/attachments`.
- Instead of fixing this on the backend (and maybe break some existing links), teach the quoted reply about this context and remove it from the image source before generating the markdown.

Reported-by: mrwusel (via Matrix)

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8574
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-07-19 16:33:30 +02:00
..
css feat(ui): redesign user profile actions layout (#7906) 2025-06-24 14:16:51 +02:00
fomantic Lock file maintenance (forgejo) (#8195) 2025-06-16 11:42:27 +02:00
js [v12.0/forgejo] fix: correct image source for quoted reply (#8574) 2025-07-19 16:33:30 +02:00
svg feat(ui): redesign migration selection screen (#6795) 2025-04-19 13:51:35 +00:00