diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php index 9b13a82..cb2693b 100644 --- a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php +++ b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php @@ -89,7 +89,6 @@ function _testImageFieldFormatters($scheme) { '#height' => 20, ); $default_output = l($image, file_create_url($image_uri), array('html' => TRUE)); - $default_output = str_replace("\n", NULL, $default_output); $this->drupalGet('node/' . $nid); $this->assertRaw($default_output, 'Image linked to file formatter displaying correctly on full node view.'); // Verify that the image can be downloaded. diff --git a/core/modules/image/templates/image-crop-summary.html.twig b/core/modules/image/templates/image-crop-summary.html.twig index cfee8af..7c3ded0 100644 --- a/core/modules/image/templates/image-crop-summary.html.twig +++ b/core/modules/image/templates/image-crop-summary.html.twig @@ -17,11 +17,16 @@ * @ingroup themeable */ #} -{% if data.width and data.height %}{{ data.width|e }}x{{ data.height|e }} -{% else %} +{% if data.width and data.height -%} + {{ data.width|e }}x{{ data.height|e }} +{%- else -%} {% if data.width %} - {% trans %}width {{ data.width|e }}{% endtrans %} + {% trans %} + width {{ data.width|e }} + {% endtrans %} {% elseif data.height %} - {% trans %}height {{ data.height|e }}{% endtrans %} + {% trans %} + height {{ data.height|e }} + {% endtrans %} {% endif %} -{% endif %} +{%- endif %} diff --git a/core/modules/image/templates/image-resize-summary.html.twig b/core/modules/image/templates/image-resize-summary.html.twig index 6f8b21e..3a9c7a7 100644 --- a/core/modules/image/templates/image-resize-summary.html.twig +++ b/core/modules/image/templates/image-resize-summary.html.twig @@ -15,11 +15,16 @@ * @ingroup themeable */ #} -{% if data.width and data.height %}{{ data.width|e }}x{{ data.height|e }} -{% else %} +{% if data.width and data.height -%} + {{ data.width|e }}x{{ data.height|e }} +{%- else -%} {% if data.width %} - {% trans %}width {{ data.width|e }}{% endtrans %} + {% trans %} + width {{ data.width|e }} + {% endtrans %} {% elseif data.height %} - {% trans %}height {{ data.height|e }}{% endtrans %} + {% trans %} + height {{ data.height|e }} + {% endtrans %} {% endif %} -{% endif %} +{%- endif %} diff --git a/core/modules/image/templates/image-scale-summary.html.twig b/core/modules/image/templates/image-scale-summary.html.twig index d5936c4..2f2f91f 100644 --- a/core/modules/image/templates/image-scale-summary.html.twig +++ b/core/modules/image/templates/image-scale-summary.html.twig @@ -16,14 +16,19 @@ * @ingroup themeable */ #} -{% if data.width and data.height %}{{ data.width|e }}x{{ data.height|e }} -{% else %} +{% if data.width and data.height -%} + {{ data.width|e }}x{{ data.height|e }} +{%- else -%} {% if data.width %} - {% trans %}width {{ data.width|e }}{% endtrans %} + {% trans %} + width {{ data.width|e }} + {% endtrans %} {% elseif data.height %} - {% trans %}height {{ data.height|e }}{% endtrans %} + {% trans %} + height {{ data.height|e }} + {% endtrans %} {% endif %} -{% endif %} +{%- endif %} {% if data.upscale %} {% trans %} diff --git a/core/modules/responsive_image/lib/Drupal/responsive_image/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/lib/Drupal/responsive_image/Tests/ResponsiveImageFieldDisplayTest.php index 1f39a2f..c520c31 100644 --- a/core/modules/responsive_image/lib/Drupal/responsive_image/Tests/ResponsiveImageFieldDisplayTest.php +++ b/core/modules/responsive_image/lib/Drupal/responsive_image/Tests/ResponsiveImageFieldDisplayTest.php @@ -151,7 +151,6 @@ public function _testResponsiveImageFieldFormatters($scheme) { '#height' => 20, ); $default_output = l($image, file_create_url($image_uri), array('html' => TRUE)); - $default_output = str_replace("\n", NULL, $default_output); $this->drupalGet('node/' . $nid); $this->assertRaw($default_output, 'Image linked to file formatter displaying correctly on full node view.'); // Verify that the image can be downloaded.