Le 29 oct. 2012 à 15:30, glenn andreas <gandr...@me.com> a écrit :

> Given that there are also decimal (&#DD;) and hexadecimal escape sequences 
> (&#xHHHH;) in HTML, trying to support those through the use of a dictionary 
> of sequence -> replacement is going to be impractical.

Hopefully, I have only to address a tiny subset of these.

> Scanning through the string to find & and test for valid escape sequences 
> (including both the 250 or so named entities plus those numeric escape 
> sequences) is the right way to go, since the time spent on the string is 
> dependent on the number of escape sequences in the string, not the number of 
> possible escape sequences.

That’s blatant. I wonder why Apple never added a method in Cocoa to perform 
this task. Is there anything close in WebKit?

V.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to