? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
30 May 2021

Summary of Changes

Joomla 4 should use <br> throughout apparently.

In several places, including the new Mail Templates, we use nl2br which has a second parameter called use_xhtml which by default is set to true - docs: https://www.php.net/manual/en/function.nl2br.php

This pr sets all instances to not use xhtml and thus generate <br> and not <br /> tags

Testing Instructions

Code review is easiest

For Mail Templates, edit options and set Mail Format = HTML, but dont edit any of the templates to provide a HTML version, letting Joomla convert the language string (which is plain text) into "magic" HTML - send an email and inspect its source

Actual result BEFORE applying this Pull Request

Example

Screenshot 2021-05-30 at 18 43 34

Expected result AFTER applying this Pull Request

Any use of nl2br in Joomla 4 renders <br> and not <br /> tags

Screenshot 2021-05-30 at 18 44 31

Documentation Changes Required

avatar PhilETaylor PhilETaylor - open - 30 May 2021
avatar PhilETaylor PhilETaylor - change - 30 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 May 2021
Category Administration com_users Front End com_contact Libraries
avatar PhilETaylor PhilETaylor - change - 30 May 2021
The description was changed
Title
[4] use <br> and not <br /> when using nl2br
[4] use and not when using nl2br
avatar PhilETaylor PhilETaylor - edited - 30 May 2021
avatar brianteeman brianteeman - test_item - 30 May 2021 - Tested successfully
avatar brianteeman
brianteeman - comment - 30 May 2021

I have tested this item successfully on c681683

nice spot


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34301.

avatar sandramay0905 sandramay0905 - test_item - 31 May 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 31 May 2021

I have tested this item successfully on c681683


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34301.

avatar richard67 richard67 - change - 31 May 2021
Status Pending Ready to Commit
Labels Added: ?
avatar richard67 richard67 - edited - 31 May 2021
avatar richard67
richard67 - comment - 31 May 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34301.

avatar chmst chmst - close - 31 May 2021
avatar chmst chmst - merge - 31 May 2021
avatar chmst chmst - change - 31 May 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-31 07:55:59
Closed_By chmst
Labels Added: ?
avatar chmst
chmst - comment - 31 May 2021

Thanks!

Add a Comment

Login with GitHub to post a comment