Opened 6 years ago
Last modified 8 weeks ago
#45853 new defect (bug)
Videos embedded in a plugins readme.txt does not load while searching for a plugin in an actual WP install (not wp.org)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.0.2 |
Component: | Plugins | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
If you embed a video within your plugins readme.txt file it only shows the video on the wp.org website, videos do not load when you're searching for a plugin via an actual WordPress install. In addition, if you install a plugin and click on "View Details" to learn more about the plugin, the video also does not load here either. Inspect element shows an empty span tag:
<span class="embed-youtube"></span>
This should either embed the video or at the least display a link to the video.
Here's an example plugin for reference: https://wordpress.org/plugins/simple-icons/
Change History (3)
#1
in reply to:
↑ description
@
3 years ago
- Focuses administration added
- Keywords needs-patch added
#2
@
8 weeks ago
Hi @azouamauriac
videos do not load when you're searching for a plugin via an actual WordPress install.
I don't really get this one, can you explain more?
If you search for plugin name, while adding the new plugin, and click on more details and see the README, you would see that only span tag for embed video. So all in all, before install if you click on the more details
button and preview all the details you would be able to reproduce the same.
Let me know if this works? Else, I would add a screencast for this.
Thank You,
This ticket was mentioned in PR #8229 on WordPress/wordpress-develop by @sahilgidwani.
8 weeks ago
#3
- Keywords has-patch added; needs-patch removed
Track ticket: https://core.trac.wordpress.org/ticket/45853
This PR addresses an issue where embedded videos in a plugin’s readme.txt
file do not load when searching for plugins within a WordPress install or when viewing the plugin details modal.
- Videos embedded in a plugin’s
readme.txt
file display correctly on WordPress.org but do not appear within the WP-Admin plugin search or the "View Details" modal. - Inspecting the element showed an empty
<span class="embed-youtube"></span>
, indicating that the embedded video was stripped during sanitization.
#### Root Cause
- In
plugin-install.php
, the functioninstall_plugin_information()
sanitizes the plugin data usingwp_kses()
. - The
$plugins_allowedtags
array, which defines the permitted HTML tags, did not include support for<iframe>
, causing the embedded video to be removed.
#### Proposed Solution
- Added support for the
<iframe>
tag within$plugins_allowedtags
, allowing embedded videos from sources like YouTube and Vimeo to be retained. - Applied CSS rules to ensure iframes are properly sized within the plugin details view for better UI consistency.
Hi there welcome to wordpress trac! thanks for the report.
Replying to thememason:
I don't really get this one, can you explain more?
I'm able to reproduce this one.