Made the conversion of ids to HTML more conservative.