-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.5.5
-
None
-
MOODLE_35_STABLE
Steps to reproduce/test
- (If Atto is not the default editor:) make Atto the default editor.
- Open a course.
- Turn editing on (if it is turned off).
- If the course does not have topics except the General section, add 5 topics to it.
- Turn off JavaScript in your web browser.
- Use "Edit section" on the first section. (The page "Edit General" (to be exact, "Edit <sectionname>") will open.)
- Replace the entire content of the "Summary" field with
</div>
- Save the changes.
- Back on the course page, turn JavaScript on in your web browser.
Expected result
Topic headlines are styled as usual.
Actual result
Topic headlines have a bullet point next to them on the left. Blocks in the course (if present) may be moved to the bottom.
(Tested with Firefox 66.0.1.)
Preliminary analysis
This does not happen with JavaScript turned on. So it seems to be the result of a HTML cleanup step which is done on client side (only).
The bullet points appear, because the ul element around the headings is prematurely closed. This is probably a reaction of the browser which cleans up HTML markup when it sees the closing div tag: it injects a closing ul tag first, then places /div. This results in a change to the following li elements for the topics: they are no longer surrounded by ul so the default Moodle CSS rule which sets 'list-style: none' does not apply anymore.
Suggested way to fix
Move (or copy) cleanup of submitted HTML content to the server side.
Affected versions
Tested on a local 3.5 instance (weekly), and on demo.moodle.net and qa.moodle.net.
- is blocked by
-
MDL-49304 Unbalanced html tags can make pages completely unusable
-
- Closed
-