diff -u b/core/modules/filter/templates/filter-caption.html.twig b/core/modules/filter/templates/filter-caption.html.twig --- b/core/modules/filter/templates/filter-caption.html.twig +++ b/core/modules/filter/templates/filter-caption.html.twig @@ -12,7 +12,7 @@ * - string classes: The classes of the captioned HTML tag. */ #} -
+ {{ node }}
{{ caption }}
reverted: --- b/core/themes/classy/templates/filter-caption.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -{# -/** - * @file - * Default theme implementation for a filter caption. - * - * Returns HTML for a captioned image, audio, video or other tag. - * - * Available variables - * - string node: The complete HTML tag whose contents are being captioned. - * - string tag: The name of the HTML tag whose contents are being captioned. - * - string caption: The caption text. - * - string classes: The classes of the captioned HTML tag. - */ -#} -
-{{ node }} -
{{ caption }}
-
reverted: --- b/core/themes/classy/templates/filter-guidelines.html.twig +++ /dev/null @@ -1,31 +0,0 @@ -{# -/** - * @file - * Default theme implementation for guidelines for a text format. - * - * Available variables: - * - format: Contains information about the current text format, including the - * following: - * - name: The name of the text format, potentially unsafe and needs to be - * escaped. - * - format: The machine name of the text format, e.g. 'basic_html'. - * - attributes: HTML attributes for the containing element. - * - tips: Descriptions and a CSS ID in the form of 'module-name/filter-id' - * (only used when 'long' is TRUE) for each filter in one or more text - * formats. - * - * @see template_preprocess_filter_tips() - * - * @ingroup themeable - */ -#} -{% - set classes = [ - 'filter-guidelines-item', - 'filter-guidelines-' ~ format.format, - ] -%} - -

{{ format.name }}

- {{ tips }} - reverted: --- b/core/themes/classy/templates/filter-tips.html.twig +++ /dev/null @@ -1,63 +0,0 @@ -{# -/** - * @file - * Default theme implementation for a set of filter tips. - * - * Available variables: - * - tips: Descriptions and a CSS ID in the form of 'module-name/filter-id' - * (only used when 'long' is TRUE) for each filter in one or more text - * formats. - * - long: A flag indicating whether the passed-in filter tips contain extended - * explanations, i.e. intended to be output on the path 'filter/tips' - * (TRUE), or are in a short format, i.e. suitable to be displayed below a - * form element. Defaults to FALSE. - * - multiple: A flag indicating there is more than one filter tip. - * - * @see template_preprocess_filter_tips() - * - * @ingroup themeable - */ -#} -{% if multiple %} -

{{ 'Text Formats'|t }}

-{% endif %} - -{% if tips|length %} - {% if multiple %} -
- {% endif %} - - {% for name, tip in tips %} - {% if multiple %} - {% - set tip_classes = [ - 'filter-type', - 'filter-' ~ name|clean_class, - ] - %} - -

{{ tip.name }}

- {% endif %} - - {% if tip.list|length %} -
    - {% for item in tip.list %} - {% - set item_classes = [ - long ? 'filter-' ~ item.id|replace({'/': '-'}), - ] - %} - {{ item.tip }} - {% endfor %} -
- {% endif %} - - {% if multiple %} -
- {% endif %} - {% endfor %} - - {% if multiple %} - - {% endif %} -{% endif %} reverted: --- b/core/themes/classy/templates/text-format-wrapper.html.twig +++ /dev/null @@ -1,28 +0,0 @@ -{# -/** - * @file - * Default theme implementation for a text format-enabled form element. - * - * Available variables: - * - children: Text format element children. - * - description: Text format element description. - * - attributes: HTML attributes for the containing element. - * - aria_description: Flag for whether or not an ARIA description has been - * added to the description container. - * - * @see template_preprocess_text_format_wrapper() - * - * @ingroup themeable - */ -#} -
- {{ children }} - {% if description %} - {% - set classes = [ - aria_description ? 'description', - ] - %} - {{ description }}
- {% endif %} - only in patch2: unchanged: --- a/core/modules/filter/src/Tests/FilterUnitTest.php +++ b/core/modules/filter/src/Tests/FilterUnitTest.php @@ -118,7 +118,7 @@ function testCaptionFilter() { // Data-caption attribute. $input = ''; - $expected = '
Loquacious llama!
'; + $expected = '
Loquacious llama!
'; $output = $test($input); $this->assertIdentical($expected, $output->getProcessedText()); $this->assertIdentical($attached_library, $output->getAssets()); @@ -130,14 +130,14 @@ function testCaptionFilter() { // HTML entities in the caption. $input = ''; - $expected = '
“Loquacious llama!”
'; + $expected = '
“Loquacious llama!”
'; $output = $test($input); $this->assertIdentical($expected, $output->getProcessedText()); $this->assertIdentical($attached_library, $output->getAssets()); // HTML encoded as HTML entities in data-caption attribute. $input = ''; - $expected = '
Loquacious llama!
'; + $expected = '
Loquacious llama!
'; $output = $test($input); $this->assertIdentical($expected, $output->getProcessedText()); $this->assertIdentical($attached_library, $output->getAssets()); @@ -146,33 +146,33 @@ function testCaptionFilter() { // not allowed by the HTML spec, but may happen when people manually write // HTML, so we explicitly support it. $input = ''; - $expected = '
Loquacious llama!
'; + $expected = '
Loquacious llama!
'; $output = $test($input); $this->assertIdentical($expected, $output->getProcessedText()); $this->assertIdentical($attached_library, $output->getAssets()); // Security test: attempt an XSS. $input = ''; - $expected = '
alert(\'Loquacious llama!\')
'; + $expected = '
alert(\'Loquacious llama!\')
'; $output = $test($input); $this->assertIdentical($expected, $output->getProcessedText()); $this->assertIdentical($attached_library, $output->getAssets()); // Ensure the filter also works with uncommon yet valid attribute quoting. $input = ''; - $expected = '
Loquacious llama!
'; + $expected = '
Loquacious llama!
'; $output = $test($input); $this->assertIdentical($expected, $output->getProcessedText()); $this->assertIdentical($attached_library, $output->getAssets()); // Finally, ensure that this also works on any other tag. $input = '