Bug #1251832 - C++ template may generate invalid XML file (+correction)

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7367 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-08-15 21:42:13 +00:00
parent 36e91fc651
commit a2f4853ce5
1 changed files with 1 additions and 0 deletions

View File

@ -193,6 +193,7 @@ public:
String *ck = NewString(k);
o = Str(Getattr(obj,k));
Replaceall( ck, ":", "_" );
Replaceall( ck, "<", "&lt;" );
/* Do first to avoid aliasing errors. */
Replaceall( o, "&", "&amp;" );
Replaceall( o, "<", "&lt;" );