Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal core outputs incorrect line break tag (</br>
) in two places:
https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/modules/cont...
https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/lib/Drupal/C...
<br />
should be used instead.
Other Drupal core branches have the same issue.
Comment | File | Size | Author |
---|---|---|---|
#34 | 3212498-34.patch | 4.31 KB | paulocs |
#34 | interdiff-29-34.txt | 3.94 KB | paulocs |
#29 | 3212498-29.patch | 4.32 KB | guilhermevp |
#29 | interdiff_23-29.txt | 1.22 KB | guilhermevp |
#29 | interdiff_21-23.txt | 1.03 KB | guilhermevp |
Issue fork drupal-3212498
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
Comment #2
maximpodorov CreditAttribution: maximpodorov commentedComment #3
idebr CreditAttribution: idebr at iO commentedComment #8
Lms300 CreditAttribution: Lms300 commentedDon't mind me. Im learning how to contribute (currently failing at it =P)
Comment #9
Spokje@Lms300: Don't panic, MRs are hard in the beginning.
As you might have found out by now, don't actually click the button "create a merge request" until there are code changes committed to it. Then the test result of TestBot will always be "Not currently mergeable."
Comment #10
pragati_kanade CreditAttribution: pragati_kanade at QED42 for Drupal India Association commentedComment #11
pragati_kanade CreditAttribution: pragati_kanade at QED42 for Drupal India Association commentedAdded patch for this.
Comment #12
maximpodorov CreditAttribution: maximpodorov commented<br />
is more frequently used in Drupal core than<br/>
, so I suggest to use the former.Comment #14
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedMade changes as per comment #12.
Comment #15
vsujeetkumar CreditAttribution: vsujeetkumar at Material for Drupal India Association commentedFixing the fail tests.
Comment #16
mitthukumawat CreditAttribution: mitthukumawat as a volunteer and at Zyxware Technologies for Drupal Association commentedI have applied the patch #15 and reviewed the changed file in drupal 9.3.x-dev version.
This has fixed the tag
<br/>
to<br />
in mentioned files.Adding screenshots for reference.
Comment #17
AJV009Comment #18
SpokjeI'm pretty sure an issue can't be
Reviewed & tested by the community
when the latest patch doesn't apply and the previous patch has 1 error on Drupal CI, back toNeeds Work
so the latest patch can be re-rolled.Also put the Version to
9.3.x-dev
, since that's where new bugs should be fixed first. Then a Core Committer will backport it. I also added theNeeds reroll
tag.Comment #19
vsujeetkumar CreditAttribution: vsujeetkumar at Material for Drupal India Association commentedRe-roll patch given for 9.3.x.
Comment #20
SpokjeThanks @vsujeetkumar. TestBot seems to have problems with diskspace at the moment, pinged "People With Knowledge" on Slack (https://drupal.slack.com/archives/C51GNJG91/p1621934020018300).
Until that is fixed (the actual people are in US-timezone) there's not I/we can do about it than wait I'm afraid.
Comment #21
vsujeetkumar CreditAttribution: vsujeetkumar at Material for Drupal India Association commentedFixing CI error, Please have a look.
Comment #22
guilhermevp CreditAttribution: guilhermevp at CI&T commentedPatch updates tags correctly, just one question. Are the comments changes ok? Are they in scope or there no issue? In case they are okay I believe it is RTBC.
Comment #23
guilhermevp CreditAttribution: guilhermevp at CI&T commentedRe-uploaded patch removing changes in comments as they are out of scope, and one of them separates comment related to different things.
Comment #24
kleiton_rodrigues CreditAttribution: kleiton_rodrigues at CI&T commentedComment #25
paulocsI think we need to change it in
FinalExceptionSubscriberTest.php
as well:$this->stringStartsWith('The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException</em>: test message in ', $response->getContent());
Comment #26
kleiton_rodrigues CreditAttribution: kleiton_rodrigues at CI&T commentedComment #27
marcusvsouza CreditAttribution: marcusvsouza at CI&T commentedI applied the patch #23, which correctly updates the () tags. It's just missing the interdiff @guilhermevp.
Comment #28
guilhermevp CreditAttribution: guilhermevp at CI&T commentedComment #29
guilhermevp CreditAttribution: guilhermevp at CI&T commentedUpdated patch based on comment #25 and created a interdiff of 21-23 to make the code changes easier to follow as asked by comment #27, please review, and thanks for the feedbacks!
Comment #30
guilhermevp CreditAttribution: guilhermevp at CI&T commentedComment #31
marcusvsouza CreditAttribution: marcusvsouza at CI&T commentedI found tow more places with the incorrect tag.
StandardTest.php
FilterKernelTest.php
$f = Html::normalize('<br></br>');
Comment #32
snehal-chibde CreditAttribution: snehal-chibde at Material for Drupal India Association commentedComment #33
longwaveIn HTML5 only
<br>
is needed as it is now a void element rather than self-closing, I think in the spirit of modernisation we should move to using HTML5 standards.Re #31 those two tests should be left alone, the first is a very specialised test for cross site scripting and the second is checking that improperly formed HTML is normalised correctly.
Comment #34
paulocsNew patch and interdiff.
Comment #35
longwaveThanks, #34 looks good - to me this is RTBC assuming bot agrees.
Comment #36
larowlanCrediting @longwave for direction, @Spokje for mentoring
Comment #38
larowlanGiven we normally avoid markup changes in minor versions, I'm going to leave this as 9.3.x only.
Thanks all
Committed 967e167 and pushed to 9.3.x. Thanks!