Skip to content

Commit 5a2227c

Browse files
author
Oleg Sukhodolsky
committed
Need to escape xml tags even in CDATA
to avoid problems with strings like "]]<\something>"
1 parent 468beaf commit 5a2227c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def print_variable(name, value, kind)
173173
print("<variable name=\"%s\" kind=\"%s\" value=\"%s\" type=\"%s\" hasChildren=\"%s\" objectId=\"%#+x\">",
174174
CGI.escapeHTML(name), kind, CGI.escapeHTML(value_str), value.class,
175175
has_children, value.respond_to?(:object_id) ? value.object_id : value.id)
176-
print("<value><![CDATA[%s]]></value>", value_str)
176+
print("<value><![CDATA[%s]]></value>", CGI.escapeHTML(value_str))
177177
print('</variable>')
178178
end
179179

0 commit comments

Comments
 (0)