Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
- Subject: Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
- From: Alex Kac <email@hidden>
- Date: Thu, 09 May 2013 13:14:41 -0600
I'd strongly recommend a great tool from the DTCoreText github project - DTHTMLWriter and DTHTMLReader. It is designed to work with HTML documents and turn them into XML or like (he uses it for NSAttributedStrings).
I've been using this project very heavily and it works extremely well. For example I use it to convert HTML to ENML for Evernote. It works with loads of poorly formatted HTML.
On May 9, 2013, at 12:58 PM, Jens Alfke <email@hidden> wrote:
>
> On May 9, 2013, at 10:53 AM, Markus Spoettl <email@hidden> wrote:
>
>> Well, that's not entirely true, unfortunately. Although the documentation suggests you can, NSXMLDocument -init.... will crash if the content you're trying to feed it is sufficiently non-XML (say an ASCII text file).
>
> Well, that’s bad, especially since one of the purposes of tidy is to make it safe to read untrusted XML/HTML input.
> Have you reported this to Radar?
>
> —Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden