浏览代码

xmlwrite.pp: c14n compliance: write whitespace after PI name only if its data is not empty

git-svn-id: trunk@13856 -
sergei 16 年之前
父节点
当前提交
ea85a7ec11
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      packages/fcl-xml/src/xmlwrite.pp

+ 5 - 2
packages/fcl-xml/src/xmlwrite.pp

@@ -516,8 +516,11 @@ begin
   if not FInsideTextNode then wrtIndent;
   wrtStr('<?');
   wrtStr(TDOMProcessingInstruction(node).Target);
-  wrtChr(' ');
-  wrtStr(TDOMProcessingInstruction(node).Data);
+  if TDOMProcessingInstruction(node).Data <> '' then
+  begin
+    wrtChr(' ');
+    wrtStr(TDOMProcessingInstruction(node).Data);
+  end;
   wrtStr('?>');
 end;