Update files following swiftformat upgrade

This commit is contained in:
Stefan Ceriu
2026-01-27 08:47:03 +02:00
committed by Stefan Ceriu
parent fe189fcfed
commit 23062901c0
343 changed files with 1502 additions and 1048 deletions
@@ -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