From: Antonio Ospite Date: Wed, 18 May 2016 20:32:06 +0000 (+0200) Subject: Return a DOMElement instead of a string in Tweeper::generateEnclosure() X-Git-Tag: v0.6~27 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/b7350069c36900359b8f26c6e9794f614a40b20e?ds=sidebyside Return a DOMElement instead of a string in Tweeper::generateEnclosure() This make the generated XML have proper indentation in case the element gets added. --- diff --git a/rss_converter_instagram.com.xsl b/rss_converter_instagram.com.xsl index 5a64a57..f12ecbb 100644 --- a/rss_converter_instagram.com.xsl +++ b/rss_converter_instagram.com.xsl @@ -33,7 +33,7 @@ - + diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index 0701d5c..6ef86dd 100644 --- a/rss_converter_twitter.com.xsl +++ b/rss_converter_twitter.com.xsl @@ -33,7 +33,7 @@ - + diff --git a/tweeper.php b/tweeper.php index d84094e..579aae1 100644 --- a/tweeper.php +++ b/tweeper.php @@ -156,9 +156,7 @@ class Tweeper { $enc->setAttribute('length', $url_info['download_content_length']); $enc->setAttribute('type', $url_info['content_type']); - $dom->appendChild($enc); - - return $dom->saveXML($enc); + return $enc; } /**