Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Remove Special Characters


penders - 6:17 pm on Feb 14, 2012 (gmt 0)


If you are building meta tags from DB content which already has these 'special' characters then presumably your pages are already of a suitable encoding since you are presumably displaying these characters OK on the page? ...Then I don't see why you would need to strip these special characters? Although from your HTML dump it would seem you have a mismatch of encodings?

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?


Thread source:: http://www.webmasterworld.com/php/4417500.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com