Fixes #1224 Edit reason should be trim()'d

Fixes #1224 Edit reason should be trim()'d
I think you should use htmlspecialchars_uni for this.