forgejo/templates/repo/issue
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
..
fields Don't show hidden labels when filling out an issue template (#31576) 2024-07-14 10:39:08 +02:00
labels follow up on #2367: rel="nofollow" on in-list labels 2024-08-15 21:56:26 +02:00
milestone feat: reduce amount of morphing for milestone (#8350) 2025-07-15 02:22:49 +02:00
view_content fix: correct image source for quoted reply (#8565) 2025-07-19 15:03:10 +02:00
card.tmpl fix(ui): add missing lazy load attribute to images (#8246) 2025-06-25 18:31:03 +02:00
choose.tmpl Fix spacing in issue navbar (#30238) 2024-04-07 15:40:31 +02:00
comment_tab.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
filter_actions.tmpl fix(ui): use usual and consistent size for project icons of 16 (#7175) 2025-03-09 15:05:24 +00:00
filter_list.tmpl [gitea] week 2025-22 cherry pick (gitea/main -> forgejo) (#8198) 2025-06-17 18:28:07 +02:00
filters.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
label_precolors.tmpl Replace 10 more gt- classes with tw- (#29945) 2024-03-26 19:04:27 +01:00
labels.tmpl Fix spacing in issue navbar (#30238) 2024-04-07 15:40:31 +02:00
list.tmpl Replace gt-word-break with tw-break-anywhere 2024-06-11 08:57:27 +05:00
milestone_issues.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
milestone_new.tmpl feat: use combo markdown editor for milestone description 2024-10-22 19:58:44 +02:00
milestones.tmpl fix(ui): improve milestone/project header consistency (#7174) 2025-03-09 16:24:52 +00:00
navbar.tmpl fix(ui): correct switch ordering (#6576) 2025-01-15 19:56:17 +00:00
new.tmpl Fix incorrect redirection when creating a PR fails (#29537) 2024-03-06 12:10:45 +08:00
new_form.tmpl fix(ui): use usual and consistent size for project icons of 16 (#7175) 2025-03-09 15:05:24 +00:00
openclose.tmpl fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
search.tmpl port(gitea): Retain issue/pull sort type (#8067) 2025-06-06 15:30:52 +02:00
view.tmpl Make Issue/PR/projects more compact, misc CSS tweaks (#24459) 2023-05-03 17:58:59 -04:00
view_content.tmpl Show warning in locked issue discussion (#7726) 2025-04-30 14:03:37 +00:00
view_title.tmpl feat(ui): Display to maintainers in PR when it is editable 2025-02-09 16:22:25 +01:00