Skip to content

Fix various bugs#36446

Merged
wxiaoguang merged 5 commits intogo-gitea:mainfrom
wxiaoguang:fix-various-bugs
Jan 24, 2026
Merged

Fix various bugs#36446
wxiaoguang merged 5 commits intogo-gitea:mainfrom
wxiaoguang:fix-various-bugs

Conversation

@wxiaoguang
Copy link
Copy Markdown
Contributor

@wxiaoguang wxiaoguang commented Jan 24, 2026

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

wxiaoguang commented Jan 24, 2026

image

@wxiaoguang wxiaoguang added type/bug backport/v1.25 This PR should be backported to Gitea 1.25 labels Jan 24, 2026
@wxiaoguang wxiaoguang added this to the 1.26.0 milestone Jan 24, 2026
@wxiaoguang wxiaoguang requested a review from Copilot January 24, 2026 07:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes four distinct bugs across URL encoding, issue search navigation, and markdown rendering of commit links.

Changes:

  • Fixed OAuth2 authentication redirect URL encoding to properly handle special characters like apostrophes per RFC 3986
  • Restored issue list Quick Goto functionality to allow cross-repository navigation and fixed form submission behavior
  • Fixed markdown rendering of commit archive and patch URLs to preserve file extensions like .tar.gz, .patch, and .diff

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web_src/js/utils.ts Added RFC 3986-compliant URL query escape function
web_src/js/utils.test.ts Added test coverage for URL query escaping
web_src/js/features/common-issue-list.ts Refactored Quick Goto to use click handler and allow global search
web_src/js/features/common-issue-list.test.ts Updated tests to reflect new cross-repo navigation capability
web_src/js/features/admin/common.ts Applied proper URL encoding for OAuth2 callback URLs
web_src/css/base.css Changed inline code background to use semantic CSS variable
templates/repo/issue/search.tmpl Updated Quick Goto button to use explicit button type and visible label
options/locale/locale_en-US.json Added translation string for Quick Goto button
modules/templates/helper_test.go Added Go test to verify query escaping matches JS implementation
modules/markup/html_test.go Added tests for commit URLs with file extensions
modules/markup/html_commit.go Enhanced commit URL parsing to extract file extensions
modules/markup/html.go Updated regex pattern to capture file extensions after commit hashes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: silverwind <me@silverwind.io>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 24, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 24, 2026
@wxiaoguang wxiaoguang enabled auto-merge (squash) January 24, 2026 11:01
@wxiaoguang wxiaoguang merged commit ddc9d29 into go-gitea:main Jan 24, 2026
24 checks passed
@wxiaoguang wxiaoguang deleted the fix-various-bugs branch January 24, 2026 11:32
@GiteaBot
Copy link
Copy Markdown
Collaborator

I was unable to create a backport for 1.25. @wxiaoguang, please send one manually. 🍵

go run ./contrib/backport 36446
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Jan 24, 2026
@wxiaoguang wxiaoguang removed backport/manual No power to the bots! Create your backport yourself! backport/v1.25 This PR should be backported to Gitea 1.25 labels Jan 24, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 26, 2026
* giteaofficial/main:
  Normalize guessed languages for code highlighting (go-gitea#36450)
  Add `knip` linter (go-gitea#36442)
  Fix various bugs (go-gitea#36446)
  Update tool dependencies (go-gitea#36445)
  Update JS dependencies, adjust webpack config, misc fixes (go-gitea#36431)
  fix: Improve image captcha contrast for dark mode (go-gitea#36265)
  Refactor template render (go-gitea#36438)
  Add documentation for markdown anchor post-processing (go-gitea#36443)
  Fix markup heading parsing, fix emphasis parsing (go-gitea#36284)
  Front port changelog for 1.25.4 (go-gitea#36432)
  Bugfix: Potential incorrect runID in run status update (go-gitea#36437)
  Restrict branch naming when new change matches with protection rules (go-gitea#36405)
@kLiHz
Copy link
Copy Markdown

kLiHz commented Mar 24, 2026

This commit does not seem to be back ported into 1.25. Can anyone tell me if I’m wrong or what can I do?

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

This commit does not seem to be back ported into 1.25. Can anyone tell me if I’m wrong or what can I do?

Because many changes depend new code which is only in 1.26 (main branch), then it's impossible to do a clean backport

Which fix do you need? Or you can simply use the nightly build:

@kLiHz
Copy link
Copy Markdown

kLiHz commented Mar 24, 2026

@wxiaoguang Thanks! I'm using a custom theme from catppuccin/gitea currently.

If I ran 1.25.5,

code:not(.code-inner) {
  /* ... */
  background-color: var(--color-label-bg);
}

will take precedence of

.markup code {
  /* ... */
  background-color: var(--color-markup-code-inline);
}

In default theme, difference between two colors are not quite much, and both colors looks fine. But so is not this custom theme - inline code in Markdown (like README.md or comments in a PR request) is hard to read. Maybe see catppuccin/gitea#77 for screenshots or fernvenue's Gitea instance for real. (@fernvenue)

I searched for code-inner and found web_src/css/base.css. Them I git blame it on both main branch and release/v1.25 and found a commit relating to this PR, that makes change to that relating line of code.

After the CSS selector change, the precedence exchanges, and the theme seems to work like before.

So what I want is changes on web_src/css/base.css in this PR be back-ported. I'm not totally sure if this only will fix the bug, though during my test with 1.25.5 in releases and the nightly build, the CSS precedence did exchange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files type/bug

Projects

None yet

6 participants