[BUGFIX] Keep hyphens in custom HTML5 attributes

In frontend rendering hyphens in custom attribute names must be kept.
Use the same regexp as in t3lib_parsehtml keeps allowed special
characters.

Change-Id: I6253f1c4c0a14389fc6261c62752e41f9ddb66f9
Releases: 4.8, 4.7, 4.6, 4.5
Fixes: #34371
Reviewed-on: https://review.typo3.org/9563
Reviewed-by: Steffen Ritter
Reviewed-by: Philipp Gampe
Reviewed-by: Mario Rimann
Reviewed-by: Stefan Neufeind
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader