-
Bug
-
Resolution: Fixed
-
Minor
-
4.0
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-74350-master -
-
2
-
HQ Team International CIH2-221
The tour step is replacing the linebreak with br tag here.
Since the tour step content can be generated by HTML editor like Atto for TinyMCE now, the br tag is not a valid tag in some cases. For example: br tag inside the table tag.
Since the external_format_text and format_text will check the suitable format and use nl2br if necessary.
It's safe to remove this line.
For pre-4.0 tours, we can create an upgrade step to update all the tour formats to FORMAT_MOODLE instead of FORMAT_HTML. FORMAT_MOODLE will force the format_text to use nl2br to convert the line breaks into <br> tags
Steps to replicate:
- Login as admin.
- Navigate to Site Administration > Appearance > User tours.
- Create a new User tour.
- Click on create a new step for the User tour.
- In the step content, click on the HTML table button in the Atto editor toolbar.
- Try to insert the HTML table.
- Save the tour.
- Navigate to the URL that matches the created tour to make the tour display.
Actual result:
- There are a lot of newlines before the HTML table when the tour is displayed.
- Turn on the Web developer tool and inspect the div.modal-body element, a lot of <br> tags were added before the <table> tag.
Expected result:
- HTML table is aligned on top of the modal.
- The div.modal-body HTML content is equal to Atto editor HTML content (Click on the show HTML code in the atto editor toolbar).
- blocks
-
MDLQA-16539 CLONE - An admin can create, delete and edit user tours
- Passed