- (NSAttributedString*)attributeStringByHtmlString:(NSString*)htmlString {
NSAttributedString*attributeString;
NSData *htmlData = [htmlString dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *importParams = @{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType,
NSCharacterEncodingDocumentAttribute: [NSNumber numberWithInt:NSUTF8StringEncoding]
};
NSError*error =nil;
attributeString = [[NSAttributedStringalloc]initWithData:htmlDataoptions:importParamsdocumentAttributes:NULLerror:&error];
returnattributeString;
}