(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
1 changed files with 64 additions and 63 deletions
|
|
@ -174,8 +174,9 @@ public:
|
||||||
{
|
{
|
||||||
o = Str(Getattr(obj,k));
|
o = Str(Getattr(obj,k));
|
||||||
Replaceall( k, ":", "_" );
|
Replaceall( k, ":", "_" );
|
||||||
Replaceall( o, "<", "<" );
|
/* Do first to avoid aliasing errors. */
|
||||||
Replaceall( o, "&", "&" );
|
Replaceall( o, "&", "&" );
|
||||||
|
Replaceall( o, "<", "<" );
|
||||||
Replaceall( o, "\"", """ );
|
Replaceall( o, "\"", """ );
|
||||||
Replaceall( o, "\\", "\\\\" );
|
Replaceall( o, "\\", "\\\\" );
|
||||||
Printf(out,"<attribute name=\"%s\" value=\"%s\" id=\"%ld\" addr=\"%x\" />\n", k, o, ++id, o );
|
Printf(out,"<attribute name=\"%s\" value=\"%s\" id=\"%ld\" addr=\"%x\" />\n", k, o, ++id, o );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue