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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.