Prevent usertags created at submit time from including invalid trailing chars
There were two regex validating included characters but the one used at submit time only checked for valid characters at the start of the usertag string. Also factor the usertag validity regex into a function to reduce duplication. Fixes: commit d8c69d15