New Message: Re: Encoding entities for RSS feeds

webmaster at userland.com webmaster at userland.com
Mon Nov 14 23:37:08 CST 2005


A new message was posted:

Address: http://frontier.userland.com/discuss/msgReader$14299

By: Lawrence Lee (lawrence at userland.com)

This is the function used in Manila.

Lawrence

on encodeWithAmpersands (s) {
 try { //04/11/13, 16:37:28 by DAB
 s = string.iso8859encode (s)};
 s = string.replaceAll (s, "&", "&");
 s = string.replaceAll (s, "<", "<");
 s = string.replaceAll (s, ">", ">");
 s = string.replaceAll (s, "\"", """);
 s = string.replaceAll (s, "\'", "'");
 s = string.replaceAll (s, "{", "{");
 s = string.replaceAll (s, "}", "}");
 s = xml.entityEncode (s, false); //encode any remaining high-ascii characters
 return (s)}

This is a Manila site... http://manila.userland.com/.




More information about the Manila-Server mailing list