If an img tag has no src (src == nil), DTTextAttachment doesn't keep track of that, and tries to find a local image from the bundle, since the scheme is not "data" c.f. DTTextAttachment.m line 112:
NSString *path = [[NSBundle mainBundle] pathForResource:src ofType:nil];
It finds whatever it can find in the bundle, which may be an image, in which case the behavior is strange, or may not be an image, in which case it may crash the app. I experienced a crash when trying to set a nil into the cache.
Sorry, I didn't realize this would create another issue...
@thillerson what "another issue" are you talking about?
I meant I didn't realize the pull request would create an issue in Github issues...
each pull request IS an issue. The pull request gets closed by merging it. The original issue needs to be closed either manually or by adding "fixes #221" in the commit message.
Right, I learned that after issuing the pull request. Sorry about that - won't happen again.