Some places in Moodle strip slashes once too often. This happens when the p() or s() functions are used to output data that did not actually have slashes added. Examples are the mod.html files that provide the forms for adding and editing activity modules. This is the reason why it is not possible to get \' or \" or \\ in activity names or descriptions. They become ', " and \.
General developer forum
addslashes
This discussion has been locked so you can no longer reply to it.