mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Update files following swiftformat upgrade
This commit is contained in:
committed by
Stefan Ceriu
parent
fe189fcfed
commit
23062901c0
@@ -72,13 +72,13 @@ struct AttributedStringBuilder: AttributedStringBuilderProtocol {
|
||||
return result
|
||||
}
|
||||
|
||||
// Do not use the default HTML renderer of NSAttributedString because this method
|
||||
// runs on the UI thread which we want to avoid because renderHTMLString is called
|
||||
// most of the time from a background thread.
|
||||
// Use DTCoreText HTML renderer instead.
|
||||
// Using DTCoreText, which renders static string, helps to avoid code injection attacks
|
||||
// that could happen with the default HTML renderer of NSAttributedString which is a
|
||||
// webview.
|
||||
/// Do not use the default HTML renderer of NSAttributedString because this method
|
||||
/// runs on the UI thread which we want to avoid because renderHTMLString is called
|
||||
/// most of the time from a background thread.
|
||||
/// Use DTCoreText HTML renderer instead.
|
||||
/// Using DTCoreText, which renders static string, helps to avoid code injection attacks
|
||||
/// that could happen with the default HTML renderer of NSAttributedString which is a
|
||||
/// webview.
|
||||
func fromHTML(_ htmlString: String?) -> AttributedString? {
|
||||
guard let originalHTMLString = htmlString else {
|
||||
return nil
|
||||
|
||||
@@ -89,7 +89,9 @@ extension AttributeScopes {
|
||||
let uiKit: UIKitAttributes
|
||||
}
|
||||
|
||||
var elementX: ElementXAttributes.Type { ElementXAttributes.self }
|
||||
var elementX: ElementXAttributes.Type {
|
||||
ElementXAttributes.self
|
||||
}
|
||||
}
|
||||
|
||||
// periphery: ignore - required to make NSAttributedString to AttributedString conversion even if not used directly
|
||||
|
||||
Reference in New Issue
Block a user