Global Functionscinfu.swiftsoup 2.8.7SwiftSoup
clean(_:_:_:_:)
SwiftSoup.swift:222func clean(_ bodyHtml: String, _ baseUri: String, _ whitelist: Whitelist, _ outputSettings: OutputSettings) throws -> String?
Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of
permitted
tags and attributes.
@param bodyHtml input untrusted HTML (body fragment)
@param baseUri URL to resolve relative URLs against
@param whitelist white-list of permitted HTML elements
@param outputSettings document output settings; use to control pretty-printing and entity escape modes
@return safe HTML (body fragment)
@see Cleaner#clean(Document)