forgejo/templates/repo/issue/view_content
Gusted 8c8d646099 fix: correct image source for quoted reply (#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)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8565
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-07-19 15:03:10 +02:00
..
sidebar feat(ui): make 'Reference' in the issue sidebar more uniform (#8506) 2025-07-16 18:29:51 +02:00
add_reaction.tmpl Fix issue/comment menus 2024-12-30 16:06:18 +01:00
attachments.tmpl fix(ui): add missing lazy load attribute to images (#8246) 2025-06-25 18:31:03 +02:00
comments.tmpl feat(ui): add links to assigners in issue comments (#8264) 2025-07-09 23:23:33 +02:00
comments_authorlink.tmpl Include resource state events in Gitlab downloads (#29382) 2024-03-06 12:10:43 +08:00
comments_delete_time.tmpl Replace some gt- classes with tw- (#29570) 2024-03-11 23:36:57 +07:00
context_menu.tmpl fix: correct image source for quoted reply (#8565) 2025-07-19 15:03:10 +02:00
conversation.tmpl ui: update styling of comment headers and role labels (#6816) 2025-02-07 01:07:16 +00:00
pull.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
pull_merge_instruction.tmpl feat(ui): Suggest git switch instead of git checkout (#7385) 2025-03-30 11:37:15 +00:00
reactions.tmpl Fix issue/comment menus 2024-12-30 16:06:18 +01:00
reference_issue_dialog.tmpl Fix dropdown text ellipsis (#30628) 2024-04-22 21:02:29 +02:00
show_role.tmpl ui: update styling of comment headers and role labels (#6816) 2025-02-07 01:07:16 +00:00
sidebar.tmpl feat: "assign to me" button on PRs and issues 2024-10-08 18:36:37 +02:00
update_branch_by_merge.tmpl feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00