[skip ci] various small changes
This commit is contained in:
1 parent
4e8dfe1a23
commit
e80a41ca72
3 files changed
+7
-29
No files matched your search
@@ -7,15 +7,6 @@ class XmlObject
|
||||
|
||||
private INDENT_SIZE = 2
|
||||
|
||||
function new()
|
||||
m.escapeChars = {}
|
||||
m.escapeChars["&"] = "&"
|
||||
m.escapeChars["<"] = "<"
|
||||
m.escapeChars[">"] = ">"
|
||||
m.escapeChars[`"`] = `"`
|
||||
m.escapeChars["'"] = "'"
|
||||
end function
|
||||
|
||||
function Node(name as string, attributes = invalid as object) as boolean
|
||||
newNode = {
|
||||
name: name
|
||||
@@ -92,9 +83,11 @@ class XmlObject
|
||||
end function
|
||||
|
||||
function XmlEscape(input as string) as string
|
||||
for each escChar in m.escapeChars
|
||||
input = input.replace(escChar, m.escapeChars[escChar])
|
||||
end for
|
||||
input = input.replace("&", "&")
|
||||
input = input.replace("<", "<")
|
||||
input = input.replace(">", ">")
|
||||
input = input.replace(`"`, """)
|
||||
input = input.replace("'", "'")
|
||||
return input
|
||||
end function
|
||||
|
||||
|
||||
Reference in new issue
Block a user