the "Validating the contents of the id attribute" test case:
- Doesn't validate HTML id attributes according to the spec
- Creates a namespace clash where a user could specify two id's which would
be merged into one by the software
- Probably not worth the effort to "fix" this at all
);
$id = urlencode( Sanitizer::decodeCharReferences( strtr( $id, ' ', '_' ) ) );
- # *must* start with letters (a-zA-Z), so prefix with something
- # informative
- $id = preg_replace('/^([0-9])/','iHaveToStartWithALetter-\\1', $id);
return str_replace( array_keys( $replace ), array_values( $replace ), $id );
}