Jun 20 2008
Moodle 1.9: Calendar fails to strip slashes
Event names and body text in Calendar are not properly escaped with stripslashes. This causes slashes to appear in front of apostrophes when you edit, save and then re-edit an event that occurs over multiple dates. This bug has existed since Moodle 1.7. I’ve updated the tracker report, and attached a patch to it.
http://tracker.moodle.org/browse/MDL-10633
My initial diagnosis of the problem was wrong; I was coming off a problem with stripslashes_recursive elsewhere in Moodle and leapt to conclusions. I also didn’t read the code quite right; the bit I ‘fixed’ was actually for logging, and it was a happy accident that it happened to fix the problem in Moodle 1.8.
With Moodle 1.9 I think I’ve nailed the problem; now it’s just a question of whether we should use stripslashes or stripslashes_safe in this instance (my patches use the former, but after reading the docs for the later, stripslashes_safe is probably the way to go).
Create a free edublog to get your own comment avatar (and more!)
My patch was accepted and rolled into Moodle 1.9.2 and 1.8.6.
http://tracker.moodle.org/browse/MDL-10633