Sanitize all entity names

Only allow string.letters, string.digits, "-" and "_".

Fixes-bug: #1295962
Change-Id: I582dfb20d146d7f4f67efe9b0ac33d1841a310a9
Merge "Sanitize all entity names"