File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 88 "strings"
99
1010 "github.com/Unknwon/com"
11+ "github.com/gogits/gogs/pkg/markup"
1112
1213 api "code.gitea.io/sdk/gitea"
1314
@@ -50,7 +51,7 @@ func Search(ctx *context.APIContext) {
5051 ID : users [i ].ID ,
5152 UserName : users [i ].Name ,
5253 AvatarURL : users [i ].AvatarLink (),
53- FullName : users [i ].FullName ,
54+ FullName : markup . Sanitize ( users [i ].FullName ) ,
5455 }
5556 if ctx .IsSigned {
5657 results [i ].Email = users [i ].Email
Original file line number Diff line number Diff line change 1414 <input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="direct" {{if eq .commit_choice "direct"}}checked{{end}}>
1515 <label>
1616 <i class="octicon octicon-git-commit" height="16" width="14"></i>
17- {{.i18n.Tr "repo.editor.commit_directly_to_this_branch" .BranchName | Safe}}
17+ {{$branchName := .BranchName | Str2html}}
18+ {{.i18n.Tr "repo.editor.commit_directly_to_this_branch" $branchName | Safe}}
1819 </label>
1920 </div>
2021 </div>
Original file line number Diff line number Diff line change 2828 {{if .Issue.PullRequest.HasMerged}}
2929 {{ $mergedStr:= TimeSince .Issue.PullRequest.Merged $.Lang }}
3030 <a {{if gt .Issue.PullRequest.Merger.ID 0}}href="{{.Issue.PullRequest.Merger.HomeLink}}"{{end}}>{{.Issue.PullRequest.Merger.Name}}</a>
31- <span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Safe }}</span>
31+ <span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html }}</span>
3232 {{else}}
3333 <a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a>
3434 <span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
You can’t perform that action at this time.
0 commit comments