feat: extend <video> tag allowed attributes - #38279
Merged
Merged
Conversation
autoplay is useless nowadays without "muted" as browsers won't autoplay unmuted videos. Similarly, other attributes are also commonly used and harmless to keep. Signed-off-by: Avinash Thakur <19588421+80avin@users.noreply.github.com>
silverwind
approved these changes
Jun 30, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the default HTML sanitizer policy to permit additional commonly used <video> attributes (notably muted, enabling practical autoplay usage) while keeping the existing URL-scheme restrictions and general sanitization behavior.
Changes:
- Expand the
<video>-specific allowed attribute list to includemuted,loop, andplaysinline. - Add
width/heightto the<video>allowlist (note: these appear to already be globally allowed viageneralSafeAttrs).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
silverwind
self-requested a review
June 30, 2026 17:19
lunny
approved these changes
Jun 30, 2026
delvh
approved these changes
Jun 30, 2026
bircni
enabled auto-merge (squash)
June 30, 2026 19:48
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jul 4, 2026
* 'main' of https://github.com/go-gitea/gitea: (24 commits) [skip ci] Updated translations via Crowdin fix(actions): make runner list pagination order deterministic (go-gitea#38313) fix(release): gate draft release attachments on web download endpoints (go-gitea#38318) ci(snap): build snaps natively instead of on launchpad (go-gitea#38312) chore: update `eslint-plugin-unicorn` to v70 (go-gitea#38310) feat(webhook): support Telegram Bot API 10.1 Rich Messages (go-gitea#38298) chore(snap): drop `armhf` build (go-gitea#38311) fix(actions): prevent chevron overlap with log text when timestamps are enabled (go-gitea#38227) chore: upgrade `go-swagger` to v0.35.0 and enforce zero swagger warnings (go-gitea#38299) fix: Improve since/until when counting commits for X-Total-Count (go-gitea#38243) chore: remove eslint-plugin-array-func (go-gitea#38294) docs: Welcome Zettat to TOC (go-gitea#38303) fix(workflows): branch protection status checks fail when workflow uses on: paths filter (go-gitea#38237) chore: update node.js to v26 (go-gitea#38285) refactor: replace `vue-bar-graph` dependency with inlined SVG chart (go-gitea#38292) feat(auth): add `disable-2fa` command (go-gitea#38275) fix(oauth2): persist linkAccountData during auto-link 2FA flow (go-gitea#38274) fix(actions): allow Actions bot to push to protected branches (go-gitea#38284) [skip ci] Updated translations via Crowdin feat: extend <video> tag allowed attributes (go-gitea#38279) ...
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jul 4, 2026
* main: (24 commits) [skip ci] Updated translations via Crowdin fix(actions): make runner list pagination order deterministic (go-gitea#38313) fix(release): gate draft release attachments on web download endpoints (go-gitea#38318) ci(snap): build snaps natively instead of on launchpad (go-gitea#38312) chore: update `eslint-plugin-unicorn` to v70 (go-gitea#38310) feat(webhook): support Telegram Bot API 10.1 Rich Messages (go-gitea#38298) chore(snap): drop `armhf` build (go-gitea#38311) fix(actions): prevent chevron overlap with log text when timestamps are enabled (go-gitea#38227) chore: upgrade `go-swagger` to v0.35.0 and enforce zero swagger warnings (go-gitea#38299) fix: Improve since/until when counting commits for X-Total-Count (go-gitea#38243) chore: remove eslint-plugin-array-func (go-gitea#38294) docs: Welcome Zettat to TOC (go-gitea#38303) fix(workflows): branch protection status checks fail when workflow uses on: paths filter (go-gitea#38237) chore: update node.js to v26 (go-gitea#38285) refactor: replace `vue-bar-graph` dependency with inlined SVG chart (go-gitea#38292) feat(auth): add `disable-2fa` command (go-gitea#38275) fix(oauth2): persist linkAccountData during auto-link 2FA flow (go-gitea#38274) fix(actions): allow Actions bot to push to protected branches (go-gitea#38284) [skip ci] Updated translations via Crowdin feat: extend <video> tag allowed attributes (go-gitea#38279) ...
zeekay
pushed a commit
to hanzoai/git
that referenced
this pull request
Jul 26, 2026
autoplay is useless nowadays without "muted" as browsers won't autoplay unmuted videos. Similarly, other attributes are also commonly used and harmless to keep. <!-- 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. --> --------- Signed-off-by: Avinash Thakur <19588421+80avin@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

autoplay is useless nowadays without "muted" as browsers won't autoplay unmuted videos.
Similarly, other attributes are also commonly used and harmless to keep.