Reviewed:  https://reviews.mahara.org/9926
Committed: 
https://git.mahara.org/mahara/mahara/commit/6e4540101a32293cd12197d0babc0144ed429410
Submitter: Robert Lyon (robe...@catalyst.net.nz)
Branch:    19.04_STABLE

commit 6e4540101a32293cd12197d0babc0144ed429410
Author: Rebecca Blundell <rebeccablund...@catalyst.net.nz>
Date:   Tue Apr 30 12:03:42 2019 +1200

Bug 1826948: Stop comment text being saved with extra tags

added flags to loadHTML to stop it adding doctype and body
tags to the comment.

behatnotneeded

Change-Id: I9c9b7fd7f58a6db793212e6f82be56d3d46f3eeb
(cherry picked from commit 8a9170d8a6af3e008846ab02e43924f3f9fe6d45)

-- 
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:
  Fix Committed

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

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to