mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #53167
[Bug 1826948] [NEW] Comment text being saved with extra HTML tags
Public bug reported:
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://www.w3.org/TR/REC-html40/loose.dtd"> <html><body><p>comment text</p></body></html>
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.
** Affects: mahara
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1826948
Title:
Comment text being saved with extra HTML tags
Status in Mahara:
New
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://www.w3.org/TR/REC-html40/loose.dtd"> <html><body><p>comment text</p></body></html>
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1826948/+subscriptions
Follow ups
-
[Bug 1826948] Re: Comment text being saved with extra HTML tags
From: Cecilia Vela Gurovic, 2019-04-30
-
[Bug 1826948] A change has been merged
From: Mahara Bot, 2019-04-30
-
[Bug 1826948] Re: Comment text being saved with extra HTML tags
From: Robert Lyon, 2019-04-30
-
[Bug 1826948] A patch has been submitted for review
From: Mahara Bot, 2019-04-30
-
[Bug 1826948] A change has been merged
From: Mahara Bot, 2019-04-30
-
[Bug 1826948] A change has been merged
From: Mahara Bot, 2019-04-30
-
[Bug 1826948] A patch has been submitted for review
From: Mahara Bot, 2019-04-30
-
[Bug 1826948] A change has been merged
From: Mahara Bot, 2019-04-30
-
[Bug 1826948] Re: Comment text being saved with extra HTML tags
From: Robert Lyon, 2019-04-30
-
[Bug 1826948] A patch has been submitted for review
From: Mahara Bot, 2019-04-30
-
[Bug 1826948] A patch has been submitted for review
From: Mahara Bot, 2019-04-30