leap 2a import fails on 'nbsp;' entity

Bug #1676596 reported by \js on 2017-03-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
\js
17.04
Medium
\js
17.10
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.

\js (js0000) wrote :
\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)
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) on 2017-03-27
Changed in mahara:
milestone: none → 17.04.0

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

\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

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>

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

Other bug subscribers