Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unnecessary unescaping #26

Merged
merged 1 commit into from
May 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/godot_xml/xml.gd
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static func _make_node_element_end(parser: XMLParser) -> XMLNode:
static func _attach_node_data(node: XMLNode, parser: XMLParser) -> void:
# XMLParser treats blank stuff between nodes as NODE_TEXT, which is unwanted
# we therefore strip "blankets", resulting in only actual content slipping into .content
node.content += parser.get_node_data().strip_edges().xml_unescape()
node.content += parser.get_node_data().strip_edges()

static func _attach_node_cdata(node: XMLNode, parser: XMLParser) -> void:
node.cdata.append(parser.get_node_name().strip_edges())
Expand All @@ -199,7 +199,7 @@ static func _get_attributes(parser: XMLParser) -> Dictionary:
var attr_count: int = parser.get_attribute_count()

for attr_idx in range(attr_count):
attrs[parser.get_attribute_name(attr_idx)] = parser.get_attribute_value(attr_idx).xml_unescape()
attrs[parser.get_attribute_name(attr_idx)] = parser.get_attribute_value(attr_idx)

return attrs

Expand Down