-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing images in editor preview due to wrong links #31299
Conversation
This parsing of the URL seems like a hack, though it's not clear to me what else could be done without breaking the API. |
@KN4CK3R would you also like to take a look? |
3c2c87a
to
75d5e92
Compare
Did some rewriting, I think the problems are clear now 75d5e92 |
Parse base path and tree path so that media links can be correctly created with /media/. Resolves go-gitea#31294
Swagger did not render <> so use {}.
75d5e92
to
dc506f2
Compare
Rebased with main because it needs a new method GuessCurrentHostURL |
d7dd954
to
dc4f98e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving the implementation.
If nothing more to change, I am going to merge this PR in one day. 🙏 |
The |
I was unable to create a backport for 1.22. @brechtvl, please send one manually. 🍵
|
I will try to backport it manually. |
Parse base path and tree path so that media links can be correctly created with /media/. Resolves go-gitea#31294 --------- Co-authored-by: wxiaoguang <[email protected]> # Conflicts: # routers/common/markup.go
Parse base path and tree path so that media links can be correctly created with /media/. Resolves go-gitea#31294 --------- Co-authored-by: wxiaoguang <[email protected]> # Conflicts: # routers/common/markup.go
) Backport #31299 Parse base path and tree path so that media links can be correctly created with /media/. Resolves #31294 --------- Co-authored-by: Brecht Van Lommel <[email protected]>
* giteaofficial/main: Fix rendered wiki page link (go-gitea#31398) Refactor repo unit "disabled" check (go-gitea#31389) Refactor route path normalization (go-gitea#31381) Refactor markup code (go-gitea#31399) Add cache test for admins (go-gitea#31265) Fix double border in system status table (go-gitea#31363) Improve rubygems package registry (go-gitea#31357) Fix natural sort (go-gitea#31384) Fix missing images in editor preview due to wrong links (go-gitea#31299) Add a simple test for AdoptRepository (go-gitea#31391) [skip ci] Updated licenses and gitignores
Parse base path and tree path so that media links can be correctly created with /media/.
Resolves #31294