ZakAltF4 - 8:42 pm on Feb 14, 2012 (gmt 0)
I am using the Magento Platform. The way that the encoding is displayed on the page is handled through Magento built in filters. We are building a Meta CRON to run and grab part of the "short" description and Product name for meta description ... The problem isn't "It's already encoded" .. The problem is that Magento already filters these for pagination. Since I don't wish to search through Magento's extremely large code base and search for their filters ... (And I probably wouldn't recognize them if I saw them anyway since Magento uses it's own codebase that is set up as classes and functions) - I need a straight PHP way to do this for the weekly CRON job.
Aren't you in danger of messing up the text by simply striping these characters?
...HTMLEntities will replace said characters with their HTML-safe counterpart.
Only if you specifically do this. Is there any harm if you do?
Google doesn't recognize things like:
© I am pretty sure ... Not any more than it would recognize
“wide-mouth” ... Not to mention using valuable Meta space with a series of "HTML safe" encoding .. So there is no harm in filtering these just to create a Meta tag... Not from my standpoint. Also the original text in the database remains untouched, it's just used to generate this string.