Fix a panic in NotifyCreateIssueComment (caused by string truncation) (#17928)

* Fix a panic in NotifyCreateIssueComment (caused by string truncation)

* more unit tests

* refactor

* fix some edge cases

* use SplitStringAtByteN for comment content
This commit is contained in:
wxiaoguang 2021-12-09 13:41:17 +08:00 committed by GitHub
parent 183175263d
commit c7e23401a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 104 additions and 17 deletions

View file

@ -6,7 +6,6 @@ package models
import (
"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
)