Clean up validateAttribute() function

Remove code duplication
FEATURE: Allow explicit rel="nofollow" on links