method

xml_name_escape

rails latest stable - Class: ERB::Util
xml_name_escape(name)
private

A utility method for escaping XML names of tags and names of attributes.

xml_name_escape('1 < 2 & 3')
# => "1___2___3"

It follows the requirements of the specification: www.w3.org/TR/REC-xml/#NT-Name