self.contentStr = “h5文本”
let data = self.contentStr.dataUsingEncoding(NSUnicodeStringEncoding)
do {
let attrStr = try NSAttributedString(data: data!, options: [NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType], documentAttributes: nil)
webView.attributedText = attrStr
} catch let error as NSError{
print("error:\(error)")
}