Markdown parsing incorrectly for video links #1728

Closed
opened 2025-11-02 04:11:30 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @coolaj86 on GitHub (Apr 23, 2018).

Gitea version 1.4.0

Go version 1.1.0

This snippet in the README.md should create an image that links to the YouTube video:

[![Free SSL with Greenlock.js](https://i.imgur.com/Y8ix6Ts.png)](https://youtu.be/e8vaR4CEZ5s)

Like this:

Free SSL with Greenlock.js

Instead it creates an <a> tag with an empty string that cannot be clicked on for the YouTube video and a second link to the picture, which links to the picture itself.

Example:

dfabdd15dd/README.md

Originally created by @coolaj86 on GitHub (Apr 23, 2018). Gitea version 1.4.0 Go version 1.1.0 This snippet in the README.md should create an image that links to the YouTube video: ``` [![Free SSL with Greenlock.js](https://i.imgur.com/Y8ix6Ts.png)](https://youtu.be/e8vaR4CEZ5s) ``` Like this: [![Free SSL with Greenlock.js](https://i.imgur.com/Y8ix6Ts.png)](https://youtu.be/e8vaR4CEZ5s) Instead it creates an `<a>` tag with an empty string that cannot be clicked on for the YouTube video and a second link to the picture, which links to the picture itself. Example: https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/dfabdd15dd04742a7af296b70ad84d674f956953/README.md
GiteaMirror added the type/bug label 2025-11-02 04:11:30 -06:00
Author
Owner

@coolaj86 commented on GitHub (Apr 23, 2018):

This commit on my own gitea instance demonstrates that the link is parsed incorrectly.

@coolaj86 commented on GitHub (Apr 23, 2018): [This commit](https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/dfabdd15dd04742a7af296b70ad84d674f956953/README.md) on my own gitea instance demonstrates that the link is parsed incorrectly.
Author
Owner

@laoshaw commented on GitHub (Nov 14, 2018):

Just found out this bug, it's impractical to embed any video without fixing this, as shown a pic for the video is very helpful.

@laoshaw commented on GitHub (Nov 14, 2018): Just found out this bug, it's impractical to embed any video without fixing this, as shown a pic for the video is very helpful.
Author
Owner

@laoshaw commented on GitHub (Dec 2, 2018):

@coolaj86 gitea 1.6.0 seems fixed this, I can click on the image then it jumps to youtube and starts playing.

still, if you self-host the video, you need click on the image to see the video, then click on the video to play it, it would be nice if I can play the video with one click though

@laoshaw commented on GitHub (Dec 2, 2018): @coolaj86 gitea 1.6.0 seems fixed this, I can click on the image then it jumps to youtube and starts playing. still, if you self-host the video, you need click on the image to see the video, then click on the video to play it, it would be nice if I can play the video with one click though
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1728