error message shows span tag escaped

Bug #1379060 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Robert Lyon

Bug Description

For example if I add a external feed block to a page and then add in gibberish for the url I get this error on save

<span id="instconf_url_error">The feed appears to be invalid. The error reported was: Could not resolve host: dfd</span>

but the problem is it's displaying the <span> as escaped html.

This patch https://reviews.mahara.org/#/c/3731/3 deals with sorting out the basic rules from being escaped - but there are other cases where the code has specified their specific error mesaages, eg
$form->set_error('url', get_string('invalidfeed', 'blocktype.externalfeed', $e->getMessage()));

needs to have a third param false added to it and the $error message escaped

$form->set_error('url', get_string('invalidfeed', 'blocktype.externalfeed', hsc($e->getMessage())), false);

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/3779

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

Reviewed: https://reviews.mahara.org/3779
Committed: http://gitorious.org/mahara/mahara/commit/7ea93380ce279b22f2c9a7d24e1ac5e7728c9348
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 7ea93380ce279b22f2c9a7d24e1ac5e7728c9348
Author: Robert Lyon <email address hidden>
Date: Thu Oct 9 12:09:05 2014 +1300

Adjusting places where form error message's container appears escaped

Bug #1379060

Looks only to be a problem with $form->set_error() and block config
forms.

Change-Id: I8ac8a7c96446e1dd37a312f482f4d31ad46dae3d
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 "1.10_STABLE" branch: https://reviews.mahara.org/3830

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

Reviewed: https://reviews.mahara.org/3830
Committed: http://gitorious.org/mahara/mahara/commit/a4dd0cb5d5678595c3da9b6724fa813ae5e6cf03
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit a4dd0cb5d5678595c3da9b6724fa813ae5e6cf03
Author: Robert Lyon <email address hidden>
Date: Thu Oct 9 12:09:05 2014 +1300

Adjusting places where form error message's container appears escaped

Bug #1379060

Looks only to be a problem with $form->set_error() and block config
forms.

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

Aaron Wells (u-aaronw)
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.