Quote Originally Posted by kburner View Post
How did you get Google to do it? How do I apply?
I have account. And the only thing I have seen is where you do the manual load. And that does not work. Only gives 29 products out of about 10,000.

Thanks, Kim
I am running the latest version of Google Base 1.7.3 but Google wasn't excepting all my product, so I replaced this portion of the sanitizer code in includes/classes/google_base.php in 1.7.3A with the one from 1.7.0
This is the difference in \includes\classes\google_base.php
Here is the section from 1.7.0a
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;
}
Here is the section from 1.7.3
function google_base_xml_sanitizer($str, $cdata = false) {
$str = str_replace(array("\t" , "\n", "\r"), ' ', $str);
$str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?äÂÄöÖüÜß]", "", $str);
$str = htmlentities(html_entity_decode($str));
$str = utf8_encode(str_replace(array("&reg;", "&copy;", "&trade;"), array('(r)', '(c)', '(tm)'), $str));
$str = $this->real_strip_tags($str, array('br', 'p'), false);
$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("&lt;", "&gt;"), array("<", ">"), $str);
if ($cdata) {
$str = '<![CDATA[' . $str . ']]>';
}
return $str;
}

function real_strip_tags($i_html, $i_allowedtags = array(), $i_trimtext = FALSE) {
if (!is_array($i_allowedtags))
$i_allowedtags = !empty($i_allowedtags) ? array($i_allowedtags) : array();
$tags = implode('|', $i_allowedtags);

if (empty($tags))
$tags = '[a-z]+';

preg_match_all('@</?\s*(' . $tags . ')(\s+[a-z_]+=(\'[^\']+\'|"[^"]+"))*\s*/?>@i', $i_html, $matches);

$full_tags = $matches[0];
$tag_names = $matches[1];

foreach ($full_tags as $i => $full_tag) {
if (!in_array($tag_names[$i], $i_allowedtags))
if ($i_trimtext)
unset($full_tags[$i]);
else
$i_html = str_replace($full_tag, '', $i_html);
}

return $i_trimtext ? implode('', $full_tags) : $i_html;
}
After I replaced the portion of the sanitizer code in includes/classes/google_base.php in 1.7.3A with the one from 1.7.0 Now Google accepts all my products. I hope this help some of you out.