#pragma mark -- 转义html中的标签
- (NSString *)HTML:(NSString *)html
{
NSScanner *theScaner = [NSScanner scannerWithString:html];
NSDictionary *dict = @{@"&":@"&", @"<":@"", @" ":@"", @""":@"\"", @"width":@"wid"};
while ([theScaner isAtEnd] == NO) {
for (int i = 0; i
[theScaner scanUpToString:[dict allKeys][i] intoString:NULL];
html = [html stringByReplacingOccurrencesOfString:[dict allKeys][i] withString:[dict allValues][i]];
}
}
return html;
}