leap 2a import fails on 'nbsp;' entity

Bug #1676596 reported by \js
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
\js
17.04
Fix Released
Medium
\js
17.10
Fix Released
Medium
Unassigned

Bug Description

mahara 16.10.2
moodle 3.1.2+
linux redhat enterprise linux 6
mysql

problem reproduced on chrome, firefox, safari

submitted a patch.

i left the old code in there, and there might be too much debugging. please send back to me for additional editing if you think it needs it. thx.

Revision history for this message
\js (js0000) wrote :
Revision history for this message
\js (js0000) wrote :

sorry- a better description!

leap 2a import fails when there are ' ' HTML entities within imported document.

there is undoubtedly a better way to do this within mahara code, but i just added an additional preg_replace to replace entity with it's character.

Changed in mahara:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → \js (js0000)
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/7569

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

Hi \js I've taken your patch and added it to our reviews system
https://reviews.mahara.org/#/c/7569/1

I tidied it up a little bit to fix with coding guidelines

Cheers

Robert

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 17.04.0
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi \js,

Can you please provide some testing instructions? I'm not able to replicate the problem you encountered when using   in a text box or in an uploaded HTML file that I display in a portfolio page.

Thank you
Kristina

Revision history for this message
\js (js0000) wrote :

testing instructions

it occurs when exporting forum posts in moodle [3.1.2+ is the moodle version i'm using]. i noted it when the forum post had an attached image, but also would receive the error when exporting plain text forum posts.

i think moodle adds them in.

let me know if you are still having trouble reproducing it

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

Reviewed: https://reviews.mahara.org/7569
Committed: https://git.mahara.org/mahara/mahara/commit/20c087019b5a37a1e77b074c1ed75b0c5412aef9
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 20c087019b5a37a1e77b074c1ed75b0c5412aef9
Author: js <email address hidden>
Date: Tue Mar 28 11:14:45 2017 +1300

Bug 1676596: Leap2A failing to import content with &nbsp;

Patch does:
- Convert &nbsp; to a space
- Give better xml fail message when failing on bad characters

behatnotneeded

Change-Id: I3df9221010080a7dde7c4f13531193a2bd6a12f3
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 "17.04_STABLE" branch: https://reviews.mahara.org/7672

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

Reviewed: https://reviews.mahara.org/7672
Committed: https://git.mahara.org/mahara/mahara/commit/440008939f661a65b8fcc60a0edec8879934babe
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit 440008939f661a65b8fcc60a0edec8879934babe
Author: js <email address hidden>
Date: Tue Mar 28 11:14:45 2017 +1300

Bug 1676596: Leap2A failing to import content with &nbsp;

Patch does:
- Convert &nbsp; to a space
- Give better xml fail message when failing on bad characters

behatnotneeded

Change-Id: I3df9221010080a7dde7c4f13531193a2bd6a12f3
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 20c087019b5a37a1e77b074c1ed75b0c5412aef9)

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.