-
Notifications
You must be signed in to change notification settings - Fork 111
escape_xml_characters
wpferguson edited this page Jun 14, 2020
·
2 revisions
escape_xml_characters
escape characters for xml documents
local ds = require "lib/dtutils.string"
local result = ds.escape_xml_characters(str)
str - string - the string that needs escaped
escape_xml_characters provides the escape sequences for
"&", '"', "'", "<", and ">"
with the corresponding
"&",""", "'", "<", and ">"
.
result - string - the string containing escapes for the xml characters
https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents