Closed
Description
Description
Telegram webhook respond an error code 400 when commit message contains special characters.
Example message:
{
"text": "[\u003ca href=\"https://git.example.com/babykart/et0ie\"\u003eKubler/et0ie\u003c/a\u003e:\u003ca href=\"https://git.example.com/babykart/et0ie/commit/6e873e503dd22aa4bf5e577bc9aa348e7b842cf7\"\u003emain\u003c/a\u003e] 1 new commit\n[\u003ca href=\"https://git.example.com/babykart/et0ie/commit/6e873e503dd22aa4bf5e577bc9aa348e7b842cf7\"\u003e6e873e5\u003c/a\u003e] [et0ie] caddy-24.05.301\n\nSigned-off-by: babykart \u003cbabykart@gmail.com\u003e - babykart",
"parse_mode": "HTML",
"disable_web_page_preview": true
}
Response:
{"ok":false,"error_code":400,"description":"Bad Request: can't parse entities: Unsupported start tag \"babykart@gmail.com\" at byte offset 326"}
These messages perfectly work with the version 1.21.11.
Gitea Version
1.22.0
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
2.45.1
Operating System
Gentoo Linux
How are you running Gitea?
Downloaded from https://github.com/go-gitea/gitea/releases/download/v1.22.0/gitea-1.22.0-linux-amd64
Database
PostgreSQL