From: <ru...@us...> - 2009-06-04 11:28:52
|
Revision: 6867 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6867&view=rev Author: rurban Date: 2009-06-04 11:28:48 +0000 (Thu, 04 Jun 2009) Log Message: ----------- do not printf, use echo! use DOCTYPE Modified Paths: -------------- trunk/lib/RssWriter.php trunk/lib/RssWriter2.php Modified: trunk/lib/RssWriter.php =================================================================== --- trunk/lib/RssWriter.php 2009-06-04 11:27:30 UTC (rev 6866) +++ trunk/lib/RssWriter.php 2009-06-04 11:28:48 UTC (rev 6867) @@ -117,7 +117,7 @@ */ function __spew() { header("Content-Type: application/xml; charset=" . RSS_ENCODING); - printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", RSS_ENCODING); + echo('<'.'?xml version="1.0" encoding="'.RSS_ENCODING.'"?'.">\n"); //printf("<!-- generator=\"PhpWiki-%s\" -->\n", PHPWIKI_VERSION); $this->printXML(); } @@ -209,7 +209,7 @@ */ function __spew() { header("Content-Type: application/atom+xml; charset=" . RSS_ENCODING); - printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", RSS_ENCODING); + echo('<'.'?xml version="1.0" encoding="'.RSS_ENCODING.'"?'.">\n"); //printf("<!-- generator=\"PhpWiki-%s\" -->\n", PHPWIKI_VERSION); $this->printXML(); } Modified: trunk/lib/RssWriter2.php =================================================================== --- trunk/lib/RssWriter2.php 2009-06-04 11:27:30 UTC (rev 6866) +++ trunk/lib/RssWriter2.php 2009-06-04 11:28:48 UTC (rev 6867) @@ -65,12 +65,12 @@ */ function __spew() { header("Content-Type: application/rss+xml; charset=" . RSS_ENCODING); - printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", RSS_ENCODING); + echo('<'.'?xml version="1.0" encoding="'.RSS_ENCODING.'"?'.">\n"); //printf("<!-- generator=\"PhpWiki-%s\" -->\n", PHPWIKI_VERSION); //RSS2 really is 0.92 - //echo '<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.92.dtd">',"\n"; - //echo "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">\n"; - //echo " %HTMLlat1;]>\n"; + echo '<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.92.dtd">',"\n"; + echo "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">\n"; + echo " %HTMLlat1;]>\n"; $this->printXML(); } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |