diff --git src/wp-includes/widgets/class-wp-widget-text.php src/wp-includes/widgets/class-wp-widget-text.php
index e6d979347d..f08b908fce 100644
|
|
class WP_Widget_Text extends WP_Widget { |
116 | 116 | } |
117 | 117 | |
118 | 118 | $doc = new DOMDocument(); |
119 | | $doc->loadHTML( sprintf( |
120 | | '<html><head><meta charset="%s"></head><body>%s</body></html>', |
| 119 | @$doc->loadHTML( sprintf( |
| 120 | '<!DOCTYPE html> <html><head><meta charset="%s"></head><body>%s</body></html>', |
121 | 121 | esc_attr( get_bloginfo( 'charset' ) ), |
122 | 122 | $instance['text'] |
123 | 123 | ) ); |
diff --git tests/phpunit/tests/widgets/text-widget.php tests/phpunit/tests/widgets/text-widget.php
index 6c7ec1f102..9bc6edcad4 100644
|
|
class Test_WP_Widget_Text extends WP_UnitTestCase { |
397 | 397 | // Check text examples that will not migrate to TinyMCE. |
398 | 398 | $legacy_text_examples = array( |
399 | 399 | '<span class="hello"></span>', |
| 400 | '<blockquote>Quote <footer>Citation</footer></blockquote>', |
400 | 401 | '<span></span>', |
401 | 402 | "<ul>\n<li><a href=\"#\" class=\"location\"></a>List Item 1</li>\n<li><a href=\"#\" class=\"location\"></a>List Item 2</li>\n</ul>", |
402 | 403 | '<a href="#" class="map"></a>', |