More strict rules on anchor character input

only alpha numeric chars and dash and underscore can be used in anchor names, and that they don't start with a number (because anchors are used as HTML ID attributes).