mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 19:45:57 +01:00
Prevent LinkConverter matching escaped apostrophe (fixes #1148)
This commit is contained in:
@@ -73,7 +73,7 @@ trait LinkConverter { self: RequestCache =>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// convert issue id to link
|
// convert issue id to link
|
||||||
.replaceBy(("(?<=(^|\\W))(GH-|" + issueIdPrefix + ")([0-9]+)(?=(\\W|$))").r){ m =>
|
.replaceBy(("(?<=(^|\\W))(GH-|(?<!&)" + issueIdPrefix + ")([0-9]+)(?=(\\W|$))").r){ m =>
|
||||||
val prefix = if(m.group(2) == "issue:") "#" else m.group(2)
|
val prefix = if(m.group(2) == "issue:") "#" else m.group(2)
|
||||||
getIssue(repository.owner, repository.name, m.group(3)) match {
|
getIssue(repository.owner, repository.name, m.group(3)) match {
|
||||||
case Some(issue) if(issue.isPullRequest) =>
|
case Some(issue) if(issue.isPullRequest) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user