1
0
mirror of https://github.com/go-gitea/gitea synced 2024-11-07 09:15:53 +01:00

Fix 500 error of searching commits (#28576)

Regression of #28454 . Now the string is escaped HTML, so it doesn't
need `| Safe`.

Fix #28575
This commit is contained in:
wxiaoguang 2023-12-22 07:09:14 +08:00 committed by GitHub
parent b35d3fddfa
commit 04b235d094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

@ -31,7 +31,7 @@
<a href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{$result.Filename | PathEscapeSegments}}#L{{.}}"><span>{{.}}</span></a>
{{end}}
</td>
<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines | Safe}}</code></td>
<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines}}</code></td>
</tr>
</tbody>
</table>

@ -53,7 +53,7 @@
<a href="{{$.SourcePath}}/src/commit/{{PathEscape $result.CommitID}}/{{PathEscapeSegments $result.Filename}}#L{{.}}"><span>{{.}}</span></a>
{{end}}
</td>
<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines | Safe}}</code></td>
<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines}}</code></td>
</tr>
</tbody>
</table>