mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Widgets: Suppress PHP warnings raised by DOMDocument::loadHTML()
in WP_Widget_Text::is_legacy_instance()
which could appear in Text widget forms.
Also explicitly use HTML5 doctype when parsing Text widget contents in legacy mode detection. Amends [41050]. See #40951. Fixes #41622. Built from https://develop.svn.wordpress.org/trunk@41251 git-svn-id: http://core.svn.wordpress.org/trunk@41091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d8bf666313
commit
ae47e05f74
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-41250';
|
||||
$wp_version = '4.9-alpha-41251';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -116,8 +116,8 @@ class WP_Widget_Text extends WP_Widget {
|
||||
}
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML( sprintf(
|
||||
'<html><head><meta charset="%s"></head><body>%s</body></html>',
|
||||
@$doc->loadHTML( sprintf(
|
||||
'<!DOCTYPE html><html><head><meta charset="%s"></head><body>%s</body></html>',
|
||||
esc_attr( get_bloginfo( 'charset' ) ),
|
||||
$instance['text']
|
||||
) );
|
||||
|
Loading…
Reference in New Issue
Block a user