mirror of https://github.com/swig/swig
(Xml_print_attributes): Do "&" replacement
before any others that might introduce "&" into the stream. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4230 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ae4f3e72b3
commit
25c8a3d592
|
@ -174,8 +174,9 @@ public:
|
|||
{
|
||||
o = Str(Getattr(obj,k));
|
||||
Replaceall( k, ":", "_" );
|
||||
Replaceall( o, "<", "<" );
|
||||
/* Do first to avoid aliasing errors. */
|
||||
Replaceall( o, "&", "&" );
|
||||
Replaceall( o, "<", "<" );
|
||||
Replaceall( o, "\"", """ );
|
||||
Replaceall( o, "\\", "\\\\" );
|
||||
Printf(out,"<attribute name=\"%s\" value=\"%s\" id=\"%ld\" addr=\"%x\" />\n", k, o, ++id, o );
|
||||
|
|
Loading…
Reference in New Issue