ReadKeep/readeck/UI/Utils/StringExtensions.swift
Ilyas Hallak 358037427c refactor: Remove unused stripHTMLSimple method from StringExtensions
- Remove stripHTMLSimple regex-based HTML stripping method
- Keep stripHTML with NSAttributedString-based implementation (used in codebase)
- Method was not used anywhere in the project
2025-12-01 22:06:52 +01:00

18 lines
498 B
Swift

import Foundation
extension String {
var stripHTML: String {
// Entfernt HTML-Tags und decodiert HTML-Entities
let attributedString = try? NSAttributedString(
data: Data(utf8),
options: [
.documentType: NSAttributedString.DocumentType.html,
.characterEncoding: String.Encoding.utf8.rawValue
],
documentAttributes: nil
)
return attributedString?.string ?? self
}
}