fusionsp:
Hmmm, now im confused? You say that the second section is from 1.7.3? Here is that version of mine that I got from numinix site. it stated that was also version 1.7.3 but it doesnt have the same info as yours. ??
// sanitizes code for XML
function google_base_xml_sanitizer($str, $cdata = false) {
$str = str_replace(array("\t" , "\n", "\r"), ' ', $str);
$str = html_entity_decode($str);
$str = strip_tags($str);
$str = htmlentities($str);
$str = utf8_encode(str_replace(array("®", "©", "™", " "), array('(r)', '(c)', '(tm)', ' '), $str));
$str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?ÀÂÄßÈÉÊËÎÏÔÖÙÛÜàâäèéêëîïôöùûüÿÇç«»]", "", $str);
$out = "";
$length = strlen($str);
for ($i = 0; $i < $length; $i++) {
$current = ord($str{$i});
if ((($current == 0x9) || ($current == 0xA) || ($current == 0xD) || (($current >= 0x20) && ($current <= 0xD7FF)) || (($current >= 0xE000) && ($current <= 0xFFFD)) || (($current >= 0x10000) && ($current <= 0x10FFFF))) && ($current > 10) ) {
$out .= chr($current);
} else {
$out .= " ";
}
}
$str = trim($out);
$str = str_replace(array("<", ">"), array("<", ">"), $str);
if ($cdata) {
$str = '<![CDATA[' . $str . ']]>';
}
return $str;
}
>
> after that section it goes into creating the url for the product image? So, what version do i have?
You are right about the version 1.7.3A on numinix site
In version 1.7.3a it has been change but it still does not work right unless you switch it out like I stated with the 1.7.0 \includes\classes\google_base.php just the sanitizes code for XML
1.7.3a Replace this code with the 1.7.0 code down below.
> // sanitizes code for XML
> function google_base_xml_sanitizer($str, $cdata = false) {
> $str = str_replace(array("\t" , "\n", "\r"), ' ', $str);
> $str = html_entity_decode($str);
> $str = strip_tags($str);
> $str = htmlentities($str);
> $str = utf8_encode(str_replace(array("®", "©", "™", " "), array('(r)', '(c)', '(tm)', ' '), $str));
> $str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?ÀÂÄßÈÉÊËÎÏÔÖÙÛÜàâäèéêëîïôöùûüÿÇç«»]", "", $str);
> $out = "";
> $length = strlen($str);
> for ($i = 0; $i < $length; $i++) {
> $current = ord($str{$i});
> if ((($current == 0x9) || ($current == 0xA) || ($current == 0xD) || (($current >= 0x20) && ($current <= 0xD7FF)) || (($current >= 0xE000) && ($current <= 0xFFFD)) || (($current >= 0x10000) && ($current <= 0x10FFFF))) && ($current > 10) ) {
> $out .= chr($current);
> } else {
> $out .= " ";
> }
> }
> $str = trim($out);
> $str = str_replace(array("<", ">"), array("<", ">"), $str);
> if ($cdata) {
> $str = '<![CDATA[' . $str . ']]>';
> }
> return $str;
> }
1.7.0
> // sanitizes code for XML
> function google_base_xml_sanitizer($str, $cdata = false) {
> $_strip_search = array("![\t ]+$|^[\t ]+!m",'%[\r\n]+%m'); // remove CRs and newlines
> $_strip_replace = array('',' ');
> $_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", " " => "");
> $str = html_entity_decode($str);
> $str = strtr($str, $_cleaner_array);
> $str = preg_replace($_strip_search, $_strip_replace, $str);
> $str = strip_tags($str);
> $str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?äÂÄöÖüÜß]", "", $str);
> $str = utf8_encode(htmlentities($str));
> //$str = $str;
> $str = str_replace('&', '&', $str);
> //if (!$cdata) {
> //$str = htmlentities(html_entity_decode($str));
> //$in = $out = array();
> //$in[] = "®"; $out[] = '(r)';
> //$in[] = "©"; $out[] = '(c)';
> //$in[] = "™"; $out[] = '(tm)';
> //$str = html_translate($str);
> $str = trim($str);
> if ($cdata) {
> $str = '<![CDATA[' . $str . ']]>';
> }
> return $str;
> }
This may not work for some of you, but it does for me. Google now excepts all my products without any errors at all.