mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	@@ -651,6 +651,7 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) {
 | 
				
			|||||||
			// When parsing HTML, x/net/html will change all quotes which are
 | 
								// When parsing HTML, x/net/html will change all quotes which are
 | 
				
			||||||
			// not used for syntax into UTF-8 quotes. So checking val[0] won't
 | 
								// not used for syntax into UTF-8 quotes. So checking val[0] won't
 | 
				
			||||||
			// be enough, since that only checks a single byte.
 | 
								// be enough, since that only checks a single byte.
 | 
				
			||||||
 | 
								if len(val) > 1 {
 | 
				
			||||||
				if (strings.HasPrefix(val, "“") && strings.HasSuffix(val, "”")) ||
 | 
									if (strings.HasPrefix(val, "“") && strings.HasSuffix(val, "”")) ||
 | 
				
			||||||
					(strings.HasPrefix(val, "‘") && strings.HasSuffix(val, "’")) {
 | 
										(strings.HasPrefix(val, "‘") && strings.HasSuffix(val, "’")) {
 | 
				
			||||||
					const lenQuote = len("‘")
 | 
										const lenQuote = len("‘")
 | 
				
			||||||
@@ -662,6 +663,7 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) {
 | 
				
			|||||||
					const lenQuote = len("‘")
 | 
										const lenQuote = len("‘")
 | 
				
			||||||
					val = val[1 : len(val)-lenQuote]
 | 
										val = val[1 : len(val)-lenQuote]
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			props[key] = val
 | 
								props[key] = val
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user