#50167 closed defect (bug) (fixed)
Relax kses rules to allow setting playsinline attributes in Video elements.
Reported by: | youknowriad | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Formatting | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
the playsinline attribute is a recent HTML attribute that is very important for mobile devices to allow playing (and auto-playing) videos inline.
The block editor allows setting that attribute for a long time now in the video block but it went unnoticed that this attribute was stripped https://github.com/WordPress/gutenberg/pull/14500
In this PR https://github.com/WordPress/gutenberg/pull/22346 we're also adding that attribute to the Cover block to fix video backgrounds on mobile.
An extra php filter is added to "override" the limitation for the cover block and that code needs to be removed once the Kses rules are relaxed.
Attachments (2)
Change History (10)
#3
@
4 years ago
Thanks, @peterwilsoncc I tried asking around and it doesn't seem like we need another attribute right now.
This ticket was mentioned in PR #290 on WordPress/wordpress-develop by peterwilsoncc.
4 years ago
#4
This ticket was mentioned in Slack in #core-editor by peterwilsoncc. View the logs.
4 years ago
#6
@
4 years ago
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
- Owner set to peterwilsoncc
- Status changed from new to assigned
In 50167.2.diff:
- Adds support for the attribute
- Adds unit tests for video element so I could test the attribute.
Yep, happy if this goes in to the allowed attributes of the
video
element.While
video
support is expanded is there any other attributes that you think are likely to need support in Gutenberg?