Here's a strange one... In an XML-feed, generated in PHP by a loop over a few lines, one HARDCODED string changes in ONE spot.
The generated XML-file is 36000-something rows. On row 8020 the following happened:
<g:google_product_category>Home & Garden > Decor > Window Treatments > Curtains & Drapes</g:google_product_category>
was changed to (note: the asterisks I added here for clarity):
<g:google_product_category>Home & Garden > Decor > Window Treatments **&ggt;** Curtains & Drapes</g:google_product_category>
The strange thing is that this line does not hold any variables that can be corrupted. It is a hardcoded string - see below. How is this possible? The line occurs 751 times in the XML-file. Only in one spot does this happen.
Upon running the XML-generator multiple times, the same type of error occurs, but not in the same place. Random "html-safe characters" (like & gt ; & amp ; get one letter duplicated to & ggt ; or & aamp ;
The XML is not generated as an object, but by a for-loop that builds a string like so:
$ret .= "<item>\n";
$ret .= "<g:id>ft-".$row["entry_id"]."</g:id>\n";
$ret .= "<g:title>".$row["title"]."</g:title>\n";
$ret .= "<g:description>".$row["description"]."</g:description>\n";
$ret .= "<g:link>http://www.example.com/sidor/fototapet/".$row["entry_id"]."?google=true</g:link>\n";
$ret .= "<g:image_link>http://www.example.com/".$this->get_filename($row2["field_id_6"],$row["entry_id"])."</g:image_link>\n";
$ret .= "<g:condition>new</g:condition>\n";
$ret .= "<g:availability>in stock</g:availability>\n";
$ret .= "<g:price>". ceil(280*$price_mod) ."</g:price>\n";
$ret .= "<g:google_product_category>Home & Garden > Decor > Window Treatments > Curtains & Drapes</g:google_product_category>\n";
$ret .= "<g:product_type>Fototapet</g:product_type>\n";
$ret .= "</item>\n";