quote ' and " in XML output too

This commit is contained in:
Johan Holmberg 2016-12-07 21:54:45 +01:00
parent b80d52c480
commit 9b977a8761

View File

@ -36,7 +36,12 @@ module Cmdtest
end
def _quote(arg)
arg.gsub(/&/, "&amp;").gsub(/</, "&lt;").gsub(/>/, "&gt;")
arg.
gsub(/&/, "&amp;").
gsub(/"/, "&quot;").
gsub(/'/, "&apos;").
gsub(/</, "&lt;").
gsub(/>/, "&gt;")
end
def close