Encode and sanitize menu labels and event names.

The labels itself can contain HTML, as such, they will need
to be filtered before used in a select field.

git-svn-id: http://textpattern.googlecode.com/svn/development/4.x@5199 2fea6a4d-a838-0410-917b-93a53c48e9d2