check that href id's are followed by valid char – fixes #10044