When trying to add a "Label" item type to a feedback activity for Moodle 1.9, if the HTML text contains a ' , saving the item produce the following error:
Error occurred in feedback module action handling
Array
(
[0] => [[item_update_failed]]
)
Activating debug mode, the following message is displayed:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'albero
', 'label', 0, 15, 0 )' at line 1
INSERT INTO mdl_feedback_item ( FEEDBACK, TEMPLATE, NAME, PRESENTATION, TYP, HASVALUE, POSITION, REQUIRED ) VALUES ( 5, 0, 'label', 'L'albero<br /><br />', 'label', 0, 15, 0 )
This is most probably a regression, as it happens only on feedback module version 2008050129, while in feedback module 2008050128 the issue is not present.
How to reproduce:
- in a 1,9.13+ (Build: 20110907) Moodle install upgrade feedback module to the latest available version in cvs contrib 2008050128
- create a feedback
- add "label" item type
- type teh following texr in the HTML field: L'albero
- click save
- the error occurs
- is duplicated by
-
MDL-29811 Feedback: Updating a label, single quotes cause save to fail
-
- Closed
-