Greetings!
From http://www.google.com/cse/docs/resultsxml.html#XML_Results
The
tag contains an excerpt for a search result that shows query terms highlighted in bold. Line breaks are included in the excerpt for proper text wrapping.
I assume this line is stripping the bold tag from Google's returned snippet result:
$snippet = check_plain(strip_tags((string)$result->S));
Is this for security purposes (I noticed the comment regarding XSS). Seems to me bolding the query term would be a nice feature to have since it's pretty standard for Search engines these days.
And being that the result->S would essentially be containing text Google has indexed from your site anyway, it should be relatively safe to not call strip_tags() on it right?
When I remove strip_tags() for $snippet, Google's bolding is perserved. What do you guys think?
Thanks!
HenryLTV