copying and pasting text with quots is displaying as '"Note"'

Bug #1520011 reported by Charlie Amoah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Robert Lyon
1.10
Fix Released
Medium
Unassigned
15.04
Fix Released
Medium
Unassigned
15.10
Fix Released
Medium
Unassigned

Bug Description

1. I was testing bug #1516412 to trigger the copy and paste message
2. I copied the text in the bug report and posted it in one of my pages called that page
3. The text looked fine on the dashboard
3. I saw a notification so I proceeded to check
4 I realised it was the the text that I copied from the bug report but the quotes around the text and had disappeared and displaying this instead: "Note".

Please see then attached screen shot.

Revision history for this message
Charlie Amoah (charlie-catalyst) wrote :
description: updated
Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 16.04.0
assignee: nobody → Robert Lyon (robertl-9)
importance: Undecided → Medium
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5801

Revision history for this message
Robert Lyon (robertl-9) wrote :

In some places, eg feedback on a page, the message for the email is saved in the db all escaped so
& = &
" = "
etc

But when we go to display it we escape it again so

& = &
" = &quotquot;

We need to unescape the string before re-escaping and displaying it to avoid double escape

Changed in mahara:
status: New → In Progress
Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5801
Committed: https://git.mahara.org/mahara/mahara/commit/6a9b5677cbe4d94f428f44ac9f93e82a975c4969
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 6a9b5677cbe4d94f428f44ac9f93e82a975c4969
Author: Robert Lyon <email address hidden>
Date: Fri Nov 27 15:53:04 2015 +1300

Bug 1520011: Notifications displaying incorrectly

If we have special chars like " or > in a feedback message they get
saved to db as htmlspecialchars like &quot; or $gt;

When we go to display them we turn the & part into a specialchar again
leading to bad display.

Change-Id: Ie66dd599029f0939938f0d1d829c4156b5db6d56
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/5830

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5831

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/5832

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5832
Committed: https://git.mahara.org/mahara/mahara/commit/fbc076c9c0bc8ccf4347009568260c368d001c51
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit fbc076c9c0bc8ccf4347009568260c368d001c51
Author: Robert Lyon <email address hidden>
Date: Fri Nov 27 15:53:04 2015 +1300

Bug 1520011: Notifications displaying incorrectly

If we have special chars like " or > in a feedback message they get
saved to db as htmlspecialchars like &quot; or $gt;

When we go to display them we turn the & part into a specialchar again
leading to bad display.

behatnotneeded

Change-Id: Ie66dd599029f0939938f0d1d829c4156b5db6d56
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5831
Committed: https://git.mahara.org/mahara/mahara/commit/ab3ea18584637ad5823f94d98ad6f7219d96f402
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit ab3ea18584637ad5823f94d98ad6f7219d96f402
Author: Robert Lyon <email address hidden>
Date: Fri Nov 27 15:53:04 2015 +1300

Bug 1520011: Notifications displaying incorrectly

If we have special chars like " or > in a feedback message they get
saved to db as htmlspecialchars like &quot; or $gt;

When we go to display them we turn the & part into a specialchar again
leading to bad display.

Change-Id: Ie66dd599029f0939938f0d1d829c4156b5db6d56
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5830
Committed: https://git.mahara.org/mahara/mahara/commit/c37828914a7508fb6e61ec5cc096b9bf3b1524fa
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit c37828914a7508fb6e61ec5cc096b9bf3b1524fa
Author: Robert Lyon <email address hidden>
Date: Fri Nov 27 15:53:04 2015 +1300

Bug 1520011: Notifications displaying incorrectly

If we have special chars like " or > in a feedback message they get
saved to db as htmlspecialchars like &quot; or $gt;

When we go to display them we turn the & part into a specialchar again
leading to bad display.

Change-Id: Ie66dd599029f0939938f0d1d829c4156b5db6d56
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.