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

Bug #1520011 reported by Charlie Amoah on 2015-11-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Robert Lyon
1.10
Medium
Unassigned
15.04
Medium
Unassigned
15.10
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.

description: updated
Robert Lyon (robertl-9) on 2015-11-27
Changed in mahara:
milestone: none → 16.04.0
assignee: nobody → Robert Lyon (robertl-9)
importance: Undecided → Medium
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) on 2015-12-03
Changed in mahara:
status: In Progress → Fix Committed
status: Fix Committed → In Progress

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>

Mahara Bot (dev-mahara) wrote :

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

Mahara Bot (dev-mahara) wrote :

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

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) on 2015-12-10
Changed in mahara:
status: In Progress → Fix Committed
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>

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  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments