Skip to content

Commit de8028e

Browse files
committed
github-issue; #2228; Encode xml entities in tag attributes
1 parent 7cf99d1 commit de8028e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Simplexml/Element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function asNiceXml($filename = '', $level = 0)
245245
$attributes = $this->attributes();
246246
if ($attributes) {
247247
foreach ($attributes as $key => $value) {
248-
$out .= ' ' . $key . '="' . str_replace('"', '\"', (string)$value) . '"';
248+
$out .= ' ' . $key . '="' . str_replace('"', '\"', $this->xmlentities($value)) . '"';
249249
}
250250
}
251251

0 commit comments

Comments
 (0)