Skip navigation.
 
mlRe: Encoding a string for HTML
FROM : David Dunham
DATE : Thu Jul 20 19:18:23 2006

On 20 Jul 2006, at 09:36, Douglas Davidson wrote:

>> I'm trying to output a string suitable for using in HTML -- no 
>> troublesome characters like < and >.


> Using NSAttributedString's HTML generation should work, although 
> it's a bit heavyweight if you don't actually want any markup.


So there's no lightweight way to do it? (Other than rolling my own 
list of entities, which seems like reinventing the wheel.)

> The use of &quot; for quotation marks is not required in HTML--the 
> standard says (http://www.w3.org/TR/REC-html40/charset.html)


I was incorrect in my statement -- the actual intent is to use within 
XML not HTML. So maybe I should remove "xml" from the exclusions and 
it will handle " ?

David Dunham    A Sharp, LLC
Voice/Fax: 206 783 7404    http://a-sharp.com
"People seem to misinterpret complexity as sophistication" -- Niklaus 
Wirth

Related mailsAuthorDate
mlEncoding a string for HTML David Dunham Jul 20, 06:25
mlRe: Encoding a string for HTML Douglas Davidson Jul 20, 18:36
mlRe: Encoding a string for HTML David Dunham Jul 20, 19:18
mlRe: Encoding a string for HTML Douglas Davidson Jul 20, 20:12
mlRe: Encoding a string for HTML Peter Bierman Jul 20, 20:41
mlRe: Encoding a string for HTML Norman Gray Jul 21, 00:13
mlRe: Encoding a string for HTML David Dunham Jul 21, 00:26
mlRe: Encoding a string for HTML Norman Gray Jul 21, 11:40