WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/19/2017 07:38:21 AM (2 years ago)
Author:
ocean90
Message:

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.

Merge of [41251] to the 4.8 branch.

Amends [41050].
See #40951.
Fixes #41622.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

  • branches/4.8/tests/phpunit/tests/widgets/text-widget.php

    r41135 r41391  
    397397        $legacy_text_examples = array(
    398398            '<span class="hello"></span>',
     399            '<blockquote>Quote <footer>Citation</footer></blockquote>',
    399400            '<span></span>',
    400401            "<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>",
Note: See TracChangeset for help on using the changeset viewer.