Method: CSL#encode_xml_text

Defined in:
lib/csl/compatibility.rb,
lib/csl/compatibility.rb

#encode_xml_text(string) ⇒ Object



35
36
37
38
39
# File 'lib/csl/compatibility.rb', line 35

def encode_xml_text(string)
  string.gsub(/[&<>]/) { |match|
    XML_ENTITY_SUBSTITUTION[match]
  }
end