-/// replaces illegal chars like ':' or '_' from SGML ID attributes
-std::string cleanID(std::string const & orig, std::string const & allowed = std::string());
+/// replaces illegal characters from SGML/XML ID attributes
+docstring cleanID(Buffer const & buf, OutputParams const & runparams,
+ docstring const & orig);