Преглед изворни кода

parser: remove atom <source> element

Andrew Dolgov пре 11 година
родитељ
комит
b584460302
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      classes/feeditem/common.php

+ 6 - 0
classes/feeditem/common.php

@@ -8,6 +8,12 @@ abstract class FeedItem_Common extends FeedItem {
 		$this->elem = $elem;
 		$this->xpath = $xpath;
 		$this->doc = $doc;
+
+		$source = $elem->getElementsByTagName("source")->item(0);
+
+		// we don't need <source> element
+		if ($source)
+			$elem->removeChild($source);
 	}
 
 	function get_author() {