Fix various trivial problems (#36921)

* Fix #36915
* Fix #36919
* Close #36600
* Close #36601
* Fix incorrect oauth2 error message display
This commit is contained in:
wxiaoguang
2026-03-19 07:13:55 +08:00
committed by GitHub
parent d6496c6156
commit 18c65965ab
7 changed files with 27 additions and 40 deletions

View File

@@ -96,6 +96,7 @@ func (s *linkifyParser) Parse(parent ast.Node, block text.Reader, pc parser.Cont
m[1] -= closing
}
} else if lastChar == ';' {
// exclude HTML entity reference, e.g.: exclude " " from "http://example.com?foo=1 "
i := m[1] - 2
for ; i >= m[0]; i-- {
if util.IsAlphaNumeric(line[i]) {
@@ -105,7 +106,7 @@ func (s *linkifyParser) Parse(parent ast.Node, block text.Reader, pc parser.Cont
}
if i != m[1]-2 {
if line[i] == '&' {
m[1] -= m[1] - i
m[1] = i
}
}
}