michaelsanford
Translator, Web Developer
http://ca.php.net/manual/en/function.htmlspecialchars.php
That function seems only to escape ' " < > &, but i'd ideally like to be able to automatically convert accented letters by their HTML entity.
Is there a function other than str_replace(); that I can use to do this?
The application: My new web site's slplash page displays a random lyrics from a MySQL database. The problem is many of them are French, so they contain accented characters. Since, strictkly speaking, there are no accented characters allowed in XHTML, I want to escape them properly for display with tags like à (which is "& agrave ;"), etc
That function seems only to escape ' " < > &, but i'd ideally like to be able to automatically convert accented letters by their HTML entity.
Is there a function other than str_replace(); that I can use to do this?
The application: My new web site's slplash page displays a random lyrics from a MySQL database. The problem is many of them are French, so they contain accented characters. Since, strictkly speaking, there are no accented characters allowed in XHTML, I want to escape them properly for display with tags like à (which is "& agrave ;"), etc