Hi,
It would be convenient to have an htmlentities like function in Pike (http://fr.php.net/htmlentities). Having this in Pike would benefit to more poeple than having it in webservers like Caudium or Roxen.
Maybe we can start with a simple thing like this:
string htmlentities(string content) { string res = "";
for(int i = 0; i < sizeof(content); i++) { if(content[i] > 127) res += sprintf("&#x%x;", content[i]); else res += content[i..i]; } return res; }
Any ideas ?
-- David Gourdelier
Hi,
I completly agree that some basic functions inside Roxen or Caudium should integrated into Pike. If so, they should be very usefull for Pike coders or users.
Maintly to help ppl to make scripts on boxes without rewritting from scratch everything all the time....
My 0,02€
/Xavier
Le mercredi, 30 jul 2003, à 19:27 Europe/Paris, David Gourdelier a écrit :
Hi,
It would be convenient to have an htmlentities like function in Pike (http://fr.php.net/htmlentities). Having this in Pike would benefit to more poeple than having it in webservers like Caudium or Roxen.
Maybe we can start with a simple thing like this:
string htmlentities(string content) { string res = "";
for(int i = 0; i < sizeof(content); i++) { if(content[i] > 127) res += sprintf("&#x%x;", content[i]); else res += content[i..i]; } return res; }
Any ideas ?
-- David Gourdelier
pike-devel@lists.lysator.liu.se