function xmlentities in Taxonomy import/export via XML 6
Same name and namespace in other branches
- 6.2 taxonomy_xml.module \xmlentities()
- 7 taxonomy_xml.module \xmlentities()
htmlentities doesn't actually encode strings to anything XML-safe. This is a slightly laborious emulation that does decimal entities not fancy character ones. Taken from http://nz.php.net/manual/en/function.htmlentities.php
4 calls to xmlentities()
- taxonomy_xml_add_terms_as_rdf in ./
rdf_format.inc - Given a list of terms, append definitions of them to the passed DOM container
- taxonomy_xml_add_terms_as_tcs in ./
tcs_format.inc - Given a list of terms, append definitions of them to the passed DOM container
- taxonomy_xml_add_vocab_as_rdf in ./
rdf_format.inc - Create a vocabulary definition (just the def, not its terms) and insert it into the given document element.
- taxonomy_xml_rdf_document in ./
rdf_format.inc - Set up an RDF document preamble. Returns a document, also sets the passed handle to the RDF node that content should land in
File
- ./
taxonomy_xml.module, line 1450 - taxonomy_xml.module This module makes it possible to import and export taxonomies as XML documents.
Code
function xmlentities($str) {
return $str;
return preg_replace('/[^\\x00-\\x7F]/e', '"@#".ord("$0").";"', $str);
}