[Developers] html entity encoding

David Flanagan david at davidflanagan.com
Fri May 2 17:29:42 UTC 2008


Christopher Dummy wrote:
>>  needless to say, if you turn it off you dont want to be using html as
>>  a display medium without further sanitization.
> 
> Does it do other things than just escaping the <>& characters?
> 

Christopher,

I've just written a program to create a topic named:
 
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ‐‑‒–—―‖‗‘’‚‛“”„

(That name is all the ASCII and ISO-8859-1 characters plus unicode 
characters for U+2010 to U+201F.  I'm not sure whether all those 
characters will come through in email.)

When I read it with mqlread and escape:false, I get the same string back.

When I read it back without escape:false, the only characters that get 
escaped are the angle brackets and the ampersand.  No numeric entities 
came back for the Latin-1 or Unicode characters.

I'll cover escape:false in the next update of my MQL documentation. 
Note, however, that API documentation, like that for mqlread will in the 
future be more formally and definitively covered here:
http://www.freebase.com/view/freebase/metaweb_api_service

	David Flanagan


More information about the Developers mailing list