From 54ff4f29cc165048fd65998e38fc8a2dbd289c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 17 Nov 2020 16:47:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Http/Formatter/XmlFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HttpServer/Http/Formatter/XmlFormatter.php b/HttpServer/Http/Formatter/XmlFormatter.php index 2dfa6e58..99c31344 100644 --- a/HttpServer/Http/Formatter/XmlFormatter.php +++ b/HttpServer/Http/Formatter/XmlFormatter.php @@ -75,7 +75,7 @@ class XmlFormatter extends Application implements IFormatter $node = $dom->addChild($key); $this->toXml($node, $val); } else { - $dom->addChild($key, $val); + $dom->addChild($key, htmlspecialchars((string)$val)); } } }