escape single quotes

This changes prevent a issue with single quotes when saving repeated inputs. I don't know if the Symphony framework provide a better way to do this, but this changes fix the bug.