Files
gitea/web_src/js
John Kiril Swensonandwxiaoguang fbf986d1c7 fix(web): "Copy link" gives a plain link for .mov/.m4v attachments (#40422)
<!--
Before submitting:
- Target the `main` branch; release branches are for backports only.
- Use a Conventional Commits title, e.g. `fix(repo): handle empty branch
names`.
- Read the contributing guidelines:
https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md
- Documentation changes go to https://gitea.com/gitea/docs

Describe your change below and link any issue it fixes.
-->

When clicking "Copy Link" on uploaded files that are `.mov` (or `.m4v`),
they would output a plain markdown link rather than a `<video>` HTML tag
and fail to render, since `isVideoFile` didn't include .mov. I also
added m4v since it was missing; other container formats are more obscure
or have flakier cross-browser support so I didn't include them (e.g.
`ogv`).

before: `[example.mov](attachments/<uuid>)`
after: `<video src="attachments/<uuid>" title="example.mov"
controls></video>`

No AI used to draft this PR.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-11-18 10:24:51 +00:00
..