evolution-rss r490 - in trunk: . src



Author: lucilanga
Date: Wed Apr  1 16:13:58 2009
New Revision: 490
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=490&view=rev

Log:
2009-04-01  Lucian Langa  <lucilanga gnome org>

* src/parser.c: (layer_find_tag) - handle xhtml content

Modified:
   trunk/ChangeLog
   trunk/src/parser.c

Modified: trunk/src/parser.c
==============================================================================
--- trunk/src/parser.c	(original)
+++ trunk/src/parser.c	Wed Apr  1 16:13:58 2009
@@ -157,7 +157,6 @@
                                 | XML_PARSE_NOENT
                                 | XML_PARSE_NOCDATA);
 
-
         xmlParseDocument (ctxt);
 
         doc = ctxt->myDoc;
@@ -538,15 +537,17 @@
 				if (node->children->type == 1			//XML_NODE_ELEMENT
 	/*			|| node->children->type == 3		*/	//XML_NODE_TEXT
 					|| node->children->next != NULL) {
-#ifdef RDF_DEBUG
-				g_print("NODE DUMP:%s|\n", xmlNodeGetContent(node->children->next));
-				
-#endif
-/*this looses html entities
+				d(g_print("NODE DUMP:%s|\n", xmlNodeGetContent(node->children->next)));
+				gchar *nodetype = xmlGetProp(node, "type");
+				if (!strcasecmp(nodetype, "xhtml")) {		// test this with "html" or smth else
+				//this looses html entities
  				len = xmlNodeDump(buf, node->doc, node->children, 0, 0);
 				content = g_strdup_printf("%s", xmlBufferContent(buf));
-				xmlBufferFree(buf);*/
-				content = xmlNodeGetContent(node->children);
+				xmlBufferFree(buf);
+				} else
+					content = xmlNodeGetContent(node->children);
+				if (nodetype)
+					xmlFree(nodetype);
 				return content;
                         	} else {
 					xmlBufferFree(buf);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]