--- libxml2-2.9.0/HTMLtree.c	2012-08-15 00:29:24.000000000 +0200
+++ libxml2-2.9.0-patched-beforeauto/HTMLtree.c	2012-09-04 16:33:13.000000000 +0200
@@ -689,12 +689,6 @@
 	           const char *encoding ATTRIBUTE_UNUSED) {
     xmlChar *value;
 
-    /*
-     * TODO: The html output method should not escape a & character
-     *       occurring in an attribute value immediately followed by
-     *       a { character (see Section B.7.1 of the HTML 4.0 Recommendation).
-     */
-
     if (cur == NULL) {
 	return;
     }
@@ -705,7 +699,7 @@
     }
     xmlOutputBufferWriteString(buf, (const char *)cur->name);
     if ((cur->children != NULL) && (!htmlIsBooleanAttr(cur->name))) {
-	value = xmlNodeListGetString(doc, cur->children, 0);
+	value = __xmlNodeListGetString(doc, cur->children, 0, 1);
 	if (value) {
 	    xmlOutputBufferWriteString(buf, "=");
 	    if ((cur->ns == NULL) && (cur->parent != NULL) &&
@@ -720,7 +714,7 @@
 
 		while (IS_BLANK_CH(*tmp)) tmp++;
 
-		escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+");
+		escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>");
 		if (escaped != NULL) {
 		    xmlBufWriteQuotedString(buf->buffer, escaped);
 		    xmlFree(escaped);
