Problem/Motivation

filter_autop() currently returns <br />, which is XHTML style self-closing tag syntax. As we are moving towards HTML5 compliance #1388926: Remove all references to "self-closing" void elements in core, it is necessary to replace the usage of <br /> with <br> as the correct void element for HTML5. This update ensures consistency across the codebase.

Steps to reproduce

1. Add a block of text with single and double line breaks.
2. Process it through filter_autop().
3. Observe that the function inserts <br /> tags for line breaks.

Proposed resolution

Modify the filter_autop() function to return <br> instead of <br />. Additionally, update the associated test cases to reflect this change by ensuring that the output contains <br> instead of the XHTML-style <br />.

Remaining tasks

N/A

User interface changes

No user interface changes.

Introduced terminology

No new terminology introduced.

API changes

No API changes.

Data model changes

No data model changes.

Release notes snippet

filter_autop() now returns <br> instead of <br /> to align with HTML5 void element standards.

Issue fork drupal-2350049

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hanno’s picture

Title: filter_autop returns self closing br element, lets alter to br » filter_autop returns self closing br element with slash, lets alter to br
legolasbo’s picture

Status: Active » Needs work
StatusFileSize
new3.95 KB

The filter now returns <br>
I've also updated the tests to reflect this change. however there is a test that keeps failing, but I can't figure out why.

hanno’s picture

Status: Needs work » Needs review

Great! let's ask the testbot why.

legolasbo’s picture

I guess the error is caused by something in my test environment, since it passes the testbot's test. The failing test seemed to be unrelated and i guess the testbot agrees.

jhedstrom’s picture

Patch still applies. Does this need to wait on #1388926: Remove all references to "self-closing" void elements in core or can it go in separately?

hanno’s picture

There is no dependency. EDIT: as this will slightly change the html output, this is a change tht needs to be documented.

mgifford’s picture

StatusFileSize
new3.95 KB

re-uploading for the bots.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

wim leers’s picture

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

StatusFileSize
new4.12 KB

Rerolled #8

Status: Needs review » Needs work

The last submitted patch, 21: 2350049-21.patch, failed testing. View results

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new3.25 KB
new1.09 KB
smustgrave’s picture

Same as #23 but with a tests-only patch

smustgrave’s picture

StatusFileSize
new1.75 KB
new3.25 KB

The last submitted patch, 25: 2350049-24-tests-only.patch, failed testing. View results

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

catch’s picture

Status: Needs review » Needs work
+++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
@@ -987,7 +987,7 @@ public function testHtmlCorrectorFilter() {
     $this->assertEquals('<img src="http://example.com/test.jpg" />test', $f, 'HTML corrector -- Automatically close single tags.');
 
-    $f = Html::normalize('<br></br>');
+    $f = Html::normalize('<br>');
     $this->assertEquals('<br />', $f, "HTML corrector -- Transform empty tags to a single closed tag if the tag's content model is EMPTY.");
 

Shouldn't this test both until HtmlCorrector also puts out HTML 5 instead of changing from one to the other?

wim leers’s picture

Version: 9.5.x-dev » 11.x-dev
Status: Needs work » Closed (outdated)
Related issues: +#2441811: Upgrade filter system to HTML5

#28++

Before
    $f = (string) $filter->process('<br>', Language::LANGCODE_NOT_SPECIFIED);
    $this->assertNormalized($f, '<br />', 'HTML filter should allow line breaks.');

    $f = (string) $filter->process('<br />', Language::LANGCODE_NOT_SPECIFIED);
    $this->assertNormalized($f, '<br />', 'HTML filter should allow self-closing line breaks.');
Since #2441811: Upgrade filter system to HTML5
    $f = (string) $filter->process('<br>', Language::LANGCODE_NOT_SPECIFIED);
    $this->assertNormalized($f, '<br>', 'HTML filter should allow line breaks.');

    $f = (string) $filter->process('<br />', Language::LANGCODE_NOT_SPECIFIED);
    $this->assertNormalized($f, '<br>', 'HTML filter should allow self-closing line breaks.');
trackleft2’s picture

Issue summary: View changes
StatusFileSize
new3.54 KB

Rerolled patch against 11.x

Looks like this should not have been closed since the change made in core/modules/filter/filter.module is still needed.

longwave’s picture

Status: Closed (outdated) » Needs review
needs-review-queue-bot’s picture

Status: Needs review » Needs work

The Needs Review Queue Bot tested this issue.

While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)

Hardik_Patel_12 made their first commit to this issue’s fork.

trackleft2’s picture

I've come across a specific issue following an upgrade from Drupal 10.1 to Drupal 10.2, which might be relevant for others. Below is a detailed step-by-step process to recreate this issue:

Initial Setup on Drupal 10.1:

  • Start with a Drupal Core 10.1 site.
  • Create a new text format with the following filters in order:
    1. "Limit allowed HTML tags and correct faulty HTML"
    2. "Convert line breaks into HTML (i.e., <br> and <p>)"
  • Create a content type and add a text area field, enabling the newly created text format.

Content Creation:

  • Create a new node using the prepared content type.
  • In the text area field, enter the following HTML:
    <p>first line<br>\n 
    second line</p>

    Note: This includes a UTF-8 0A line break character after the <br> tag.

Update to Drupal 10.2 and Observation:

  • Update the site to Drupal 10.2.
  • Review the node created earlier. Observe the duplication of <br> tags where there should only be one.

The patch attached to this issue #30 resolves the duplicate
issue for us.

mkindred’s picture

I think I'm running into this issue, but the circumstances are (confusingly) different.

I'm on 10.2.1, and I'm currently upgrading from ckeditor4 contrib to ckeditor5. I'm not using "Convert line breaks into HTML (i.e. <br> and <p>)" before or after the upgrade, yet I'm seeing doubled linebreaks after the upgrade. If I open the offending node for editing, the linebreaks look normal (single), and saving the node fixes them.

The only two filters I have enabled (before and after the upgrade) are:

- Limit allowed HTML tags and correct faulty HTML
- Correct faulty and chopped off HTML

If I apply patch #30 with the upgrade, it seems to fix the doubled linebreaks. If I'm not using the "Convert line breaks..." filter, should this patch affect me?

----

ETA: I was wrong about not having the filter enabled. See below.

longwave’s picture

Title: filter_autop returns self closing br element with slash, lets alter to br » filter_autop() returns <br /> but should return <br> for HTML5

Fixing title, hiding patches. Added some questions to the MR.

@mkindred As far as I can tell this should only make any difference if you have "Convert line breaks into HTML" enabled. But if you can reproduce otherwise, steps to do so from a clean install would be super helpful!

wim leers’s picture

Issue tags: +html5
mkindred’s picture

@longwave I tried and cannot reproduce this behavior on a clean install. My ckeditor upgrade involved ~10 commits, so I'm reviewing each one to see where the issue entered.

mkindred’s picture

Well, that's embarrassing. I did indeed have the "convert line breaks" filter enabled. I've been trying to remove old text formats for some time, and I didn't realize one of the older formats was still being used.

So to update: patch #30 does fix the issue for me while upgrading from ckeditor4 to ckeditor5 on D10.2.1 while using the "Convert line breaks into HTML" filter.

andypost’s picture

ammaletu’s picture

I can confirm that the Merge Request as it is fixes this issue in Drupal 10.2.5. We just upgraded from CKEditor 4 to 5 and had extra linebreaks whenever the source contained a linebreak right inside the paragraph (not sure how our customers managed to get the linebreaks there).

This issue turns 10 years old in just a couple of months. As far as I can see, the MR title needs to be changed and one change to the test case needs to be reverted. I tried to do that, but Gitlab wouldn't let me.

trackleft2 changed the visibility of the branch 2350049-filterautop-returns-self to hidden.

trackleft2’s picture

Status: Needs work » Needs review

I've created a new fork to change the title of the merge request.
I've updated the test to account for @longwave's suggestion.
I've merged in upstream changes from 11.x and resolved merge conflicts.
I've hidden the original merge request branch.

bberndt’s picture

StatusFileSize
new2.69 KB
trackleft2’s picture

Status: Needs review » Needs work

Now I'm seeing these test failing.

---- Drupal\Tests\filter\Kernel\FilterKernelTest ----
Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Fail      Other      phpunit-462.xml      0 Drupal\Tests\filter\Kernel\FilterKe
    PHPUnit Test failed to complete; Error: PHPUnit 10.5.29 by Sebastian
    Bergmann and contributors.
    
    Runtime:       PHP 8.3.10
    Configuration: /builds/issue/drupal-2350049/core/phpunit.xml.dist
    
    ...F......F                                                       11 / 11
    (100%)
    
    Time: 00:07.706, Memory: 10.00 MB
    
    There were 2 failures:
    
    1) Drupal\Tests\filter\Kernel\FilterKernelTest::testLineBreakFilter
    'aaa
    bbb
    
    ccc': 'aaa
    bbb
    ccc' found. Filtered result: 'aaa
    bbb
    ccc
    '.
    Failed asserting that 'aaa\n
    bbb\n
    ccc\n
    ' [ASCII](length: 32) contains "aaa
    bbb
    ccc" [ASCII](length: 29).
    
    /builds/issue/drupal-2350049/core/modules/filter/tests/src/Kernel/FilterKernelTest.php:998
    /builds/issue/drupal-2350049/core/modules/filter/tests/src/Kernel/FilterKernelTest.php:492
    
    2) Drupal\Tests\filter\Kernel\FilterKernelTest::testHtmlCorrectorFilter
    HTML corrector -- Transform empty tags to a self-closed tag if the tag's
    content model is EMPTY.
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -''
    +''
    
    /builds/issue/drupal-2350049/core/modules/filter/tests/src/Kernel/FilterKernelTest.php:1123
    
    FAILURES!
    Tests: 11, Assertions: 206, Failures: 2.

trackleft2’s picture

Status: Needs work » Needs review
StatusFileSize
new3.42 KB

Turns out when I was fixing the merge conflicts I blew away the fix.

Once the fix was back in place, one of the test failures went away, however I discovered that the second test was expecting <br> but was getting <br><br>.

The original version of the test was actually expecting <br><br> as well, so I changed it back, but changed the description.

https://git.drupalcode.org/project/drupal/-/merge_requests/9221/diffs#38...

trackleft2’s picture

Status: Needs review » Needs work

Looks like now there are failed Functional Javascript tests, but I can't figure out what is going on.

See: https://git.drupalcode.org/issue/drupal-2350049/-/jobs/2455600

See: https://git.drupalcode.org/issue/drupal-2350049/-/pipelines/255199/test_...

I did notice some <br> tags in the test file which may be related, https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/ckedi...

Also noticed that those image tests have self closing image tags, <img />.


There was 1 failure:
1) Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTest::testAlignment
Failed asserting that a NULL is not empty.
/builds/issue/drupal-2350049/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php:500
/builds/issue/drupal-2350049/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php:478
FAILURES!
Tests: 10, Assertions: 377, Failures: 1, Skipped: 1.
---- Drupal\Tests\ckeditor5\FunctionalJavascript\ImageUrlTest ----
Status Group Filename Line Function
--------------------------------------------------------------------------------
Fail Other phpunit-5.xml 0 Drupal\Tests\ckeditor5\FunctionalJa
PHPUnit Test failed to complete; Error: PHPUnit 10.5.29 by Sebastian
Bergmann and contributors.

Runtime: PHP 8.3.10
Configuration: /builds/issue/drupal-2350049/core/phpunit.xml.dist

....F.... 9 / 9
(100%)

HTML output was generated.
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-1-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-2-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-3-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-4-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-5-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-6-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-7-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-8-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-9-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-10-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-11-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-12-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-13-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-14-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-15-65270370.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-16-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-17-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-18-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-19-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-20-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-21-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-22-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-23-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-24-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-25-82605180.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-26-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-27-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-28-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-29-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-30-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-31-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-32-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-33-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-34-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-35-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-36-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-37-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-38-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-39-39342599.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-40-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-41-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-42-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-43-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-44-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-45-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-46-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-47-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-48-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-49-47971540.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-50-67092286.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-51-67092286.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-52-67092286.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-53-67092286.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-54-67092286.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-55-67092286.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-56-67092286.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-57-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-58-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-59-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-60-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-61-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-62-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-63-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-64-44903977.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-65-76981562.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-66-76981562.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-67-76981562.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-68-76981562.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-69-76981562.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-70-76981562.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-71-76981562.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-72-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-73-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-74-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-75-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-76-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-77-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-78-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-79-34129822.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-80-32155407.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-81-32155407.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-82-32155407.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-83-32155407.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-84-32155407.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-85-32155407.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-86-32155407.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-87-32155407.html
Time: 02:14.361, Memory: 10.00 MB
There was 1 failure:
1) Drupal\Tests\ckeditor5\FunctionalJavascript\ImageUrlTest::testAlignment
Failed asserting that a NULL is not empty.
/builds/issue/drupal-2350049/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php:500
/builds/issue/drupal-2350049/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php:478
FAILURES!
Tests: 9, Assertions: 389, Failures: 1.
---- Drupal\Tests\ckeditor5\FunctionalJavascript\MediaLinkabilityTest ----

trackleft2’s picture

Status: Needs work » Needs review

I updated the fork to include upstream changes from 11.x without any additional changes and now all the Functional Javascript test pass.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Issue summary should use the standard template so tagged for such.

trackleft2’s picture

Issue summary: View changes
Status: Needs work » Needs review
trackleft2’s picture

Issue summary: View changes
trackleft2’s picture

Issue summary: View changes
trackleft2’s picture

Issue summary: View changes
andypost’s picture

smustgrave changed the visibility of the branch 11.x to hidden.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Cleaning up MRs/patches

Ran test-only feature https://git.drupalcode.org/issue/drupal-2350049/-/jobs/2464098 which shows the coverage.

Not sure any BC concern, know filter module changes are difficult and take a while sometimes. But any 2 second research shows that
is correct for HTML5 so believe this change is correct.

Going to go on a limb, hope no BC concern, and mark

quietone’s picture

Everything looks in order here. The other MR, MR6262 has some questions/answers.

@trackleft2, thanks for commenting on the work you did and getting this to RTBC. I see that you create a new fork to change the title of the merge request. I appreciate that not everyone can edit all features of an MR but when a new MR is created it doesn't have the comments that are on the old one. That makes it just a bit harder for reviewers. It would help to use the existing MR and if you would like someone changed, ask in the issue or in Slack, #contribute. Thanks!

larowlan’s picture

Status: Reviewed & tested by the community » Needs review

Can we resolve the questions on MR 6262 to confirm they're resolved in the new MR? thanks

Fine to self RTBC if they're resolved

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Believe the questions on MR 6262 have actually been addressed, went ahead and closed the MR too.

nod_’s picture

Status: Reviewed & tested by the community » Needs work

The question was:
— In here (and some later regexes) do we need to look for any of <br>, <br/>, <br />?
— I don't think there should be any more <br/> or <br /> now that this #2441811: Upgrade filter system to HTML5 was merged.

That's not reassuring, can we confirm that there is no way to have a <br /> in D11? what about when upgrading a CKE 4 config? does it hurt to keep the regexs for a couple of releases?

niranjan_panem’s picture

Ran the tests related to the line breaks, works as expected in drupal 11.

joegraduate made their first commit to this issue’s fork.

joegraduate’s picture

StatusFileSize
new3.54 KB

Updated !MR9221 with latest from 11.x and resolved merged conflicts.

Attaching current diff as updated static patch usable with composer for 11.3.x.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

joegraduate’s picture

StatusFileSize
new3.69 KB

Updated !MR9221 with latest from main, resolved merged conflicts (involved moving changes from _filter_autop() to FilterAutoP::process()), applied @longwave's suggestion.

Attaching current diff as updated static patch usable with composer for 11.4.x.