Format podcast RSS XML with newlines

This commit is contained in:
Albert Santoni 2015-11-17 16:18:38 -05:00
parent 6a668f79af
commit ff96eba9ea
1 changed files with 7 additions and 1 deletions

View File

@ -440,7 +440,13 @@ class Application_Service_PodcastService
self::addEscapedChild($item, "xmlns:itunes:duration", $publishedFile->getDbLength());
}
return $xml->asXML();
//Format it nicely with newlines...
$dom = new DOMDocument();
$dom->loadXML($xml->asXML());
$dom->formatOutput = true;
$formattedXML = $dom->saveXML();
return $formattedXML;
} catch (FeedException $e) {
return false;