dbrimlow Posted July 23, 2009 Share Posted July 23, 2009 I took over an application that sends an RSS feed with ads to craigslist. The following is part of a str_replace that looks wrong to me, but I can't test it to check because it is not on a development server (only live). The sibling "<![CDATA" of the named parent "<cl:previewHTML>" below is closed last, evan after the RDF root has closed. Can that be right under any circumstances? Here is how it is: $data1 = str_replace("<cl:previewHTML><![CDATA[", "", $data1); $data1 = str_replace("</cl:previewHTML>", "", $data1); $data1 = str_replace("</item>", "", $data1); $data1 = str_replace("</rdf:RDF>", "", $data1); $data1 = str_replace("]]>", "", $data1); Wouldn't it need to be closed before its parent closes under any circumstances? Like: $data1 = str_replace("<cl:previewHTML><![CDATA[", "", $data1); $data1 = str_replace("]]>", "", $data1); $data1 = str_replace("</cl:previewHTML>", "", $data1); $data1 = str_replace("</item>", "", $data1); $data1 = str_replace("</rdf:RDF>", "", $data1); Is there enough of the code shown to determine, or do I need to post the whole concatenation? Thanks Link to comment https://forums.phpfreaks.com/topic/167181-rss-feed-syntax-issue-in-str_replace/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.