mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Fixed emoji alias not parsed in links (#16221)
* Do not skip links. * Restrict text in links to emojis. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		| @@ -391,5 +391,13 @@ func TestRenderSiblingImages_Issue12925(t *testing.T) { | ||||
| 	res, err := RenderRawString(&markup.RenderContext{}, testcase) | ||||
| 	assert.NoError(t, err) | ||||
| 	assert.Equal(t, expected, res) | ||||
|  | ||||
| } | ||||
|  | ||||
| func TestRenderEmojiInLinks_Issue12331(t *testing.T) { | ||||
| 	testcase := `[Link with emoji :moon: in text](https://gitea.io)` | ||||
| 	expected := `<p><a href="https://gitea.io" rel="nofollow">Link with emoji <span class="emoji" aria-label="waxing gibbous moon">🌔</span> in text</a></p> | ||||
| ` | ||||
| 	res, err := RenderString(&markup.RenderContext{}, testcase) | ||||
| 	assert.NoError(t, err) | ||||
| 	assert.Equal(t, expected, res) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user