Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Fix invalid xml (escape &)


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16334 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jun 13, 2013
1 parent 352e2a3 commit 1ba4571
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Compiler/Util/Util.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2409,7 +2409,8 @@ public function xmlEscape "Escapes a String so that it can be used in xml"
input String s1;
output String s2;
algorithm
s2 := stringReplaceChar(s1,"<","&lt;");
s2 := stringReplaceChar(s1,"&","&amp;");
s2 := stringReplaceChar(s2,"<","&lt;");
s2 := stringReplaceChar(s2,">","&gt;");
s2 := stringReplaceChar(s2,"\"","&quot;");
end xmlEscape;
Expand Down

0 comments on commit 1ba4571

Please sign in to comment.