GNOME Bugzilla – Bug 593421
xmlSaveTree yields unexpected results when dumping meta tags
Last modified: 2009-08-28 22:33:20 UTC
Created attachment 141953 [details] Weird meta tag output reproduction file When dumping a meta tag from a parsed HTML document with the xmlSaveToIO function, the output is unexpected. The output looks like this: < ="" content=""></> When it should be like this: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Here is a sample C file to reproduce the problem (I've attached the same file as well): http://gist.github.com/177141
copied as tst.c in the libxml2 source dir, make tst, then paphio:~/XML -> ./tst <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> paphio:~/XML -> valgrind ./tst <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> paphio:~/XML -> works for me ! Can't reproduce this, so I will need more input or you need to make more checks on how this got compiled, Daniel
Sure, what info can I provide? I'm linking and compiling against libxml2 2.7.3. uname info: [apatterson@higgins libxml2-2.7.3]$ uname -a Darwin higgins.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 GCC Info: [apatterson@higgins libxml2-2.7.3]$ gcc -v Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5490) [apatterson@higgins libxml2-2.7.3]$
Also, when I run with valgrind, it works. But when I run without valgrind, I get the strange output. I will attach my valgrind output
Created attachment 141960 [details] valgrind output
This seems to work in head on git. I will now attempt to close the ticket!