Comment text being saved with extra HTML tags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Unassigned |
Bug Description
In 18.04 we made a change which meant we inadvertently started saving comment text like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://
instead of like this:
<p>comment text</p>
this is because a call to loadHTML() adds the extra tags unless passed in flags tell it not to.
As well as fixing this problem, we need to check that other places in the code that use loadHTML() are not also adding extra tags.
Steps to reproduce:
1. Add a comment
2. Check the database and check what is stored in the artefact table for the text of that comment
What you should see:
The text of the comment you added inside <p> tags
What you currently see:
The text of the comment you added inside the doctype and body tags as well.
Changed in mahara: | |
status: | New → In Progress |
importance: | Undecided → High |
milestone: | none → 19.04.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/9912