mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Backport #28576 by wxiaoguang Regression of #28454 . Now the string is escaped HTML, so it doesn't need `| Safe`. Fix #28575 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		@@ -31,7 +31,7 @@
 | 
				
			|||||||
										<a href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{$result.Filename | PathEscapeSegments}}#L{{.}}"><span>{{.}}</span></a>
 | 
															<a href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{$result.Filename | PathEscapeSegments}}#L{{.}}"><span>{{.}}</span></a>
 | 
				
			||||||
									{{end}}
 | 
														{{end}}
 | 
				
			||||||
								</td>
 | 
													</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>
 | 
												</tr>
 | 
				
			||||||
						</tbody>
 | 
											</tbody>
 | 
				
			||||||
					</table>
 | 
										</table>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,7 +53,7 @@
 | 
				
			|||||||
														<a href="{{$.SourcePath}}/src/commit/{{PathEscape $result.CommitID}}/{{PathEscapeSegments $result.Filename}}#L{{.}}"><span>{{.}}</span></a>
 | 
																			<a href="{{$.SourcePath}}/src/commit/{{PathEscape $result.CommitID}}/{{PathEscapeSegments $result.Filename}}#L{{.}}"><span>{{.}}</span></a>
 | 
				
			||||||
													{{end}}
 | 
																		{{end}}
 | 
				
			||||||
												</td>
 | 
																	</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>
 | 
																</tr>
 | 
				
			||||||
										</tbody>
 | 
															</tbody>
 | 
				
			||||||
									</table>
 | 
														</table>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user