Tips contain invalid HTML

Created on 18 April 2024, 7 months ago
Updated 19 September 2024, about 2 months ago

The tips defined in the following code contain invalid HTML

  public function tips($long = FALSE) {
    if ($long) {
      return $this->t('
        <p>Applies the resizing on embedded media images inside ckeditor5 generated content when rendering the ckeditor content in Drupal.</p>
        <p>This works via a the data-media-width attribute on &lt;drupal-media&gt; tags, for example: &lt;drupal-media data-media-width=&quot;50%&quot;.</p>
      ');
    }
    else {
      return $this->t('You can resize media images by adding the data-media-width attribute on &lt;drupal-media&gt; tags, for example: &lt;drupal-media data-media-width=&quot;50%&quot;.');
    }
  }

The <drupal-media> tags are not being closed properly, which breaks downstream HTML.

Solution

<drupal-media> should become <drupal-media />

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands koosvdkolk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024