diff --git a/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift b/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift index 55de1361..976485f9 100644 --- a/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift +++ b/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift @@ -9,6 +9,7 @@ import UIKit import Pachyderm import WebURLFoundationExtras +import SwiftSoup class TrendingLinkCardCollectionViewCell: UICollectionViewCell { @@ -55,7 +56,7 @@ class TrendingLinkCardCollectionViewCell: UICollectionViewCell { let provider = card.providerName!.trimmingCharacters(in: .whitespacesAndNewlines) providerLabel.text = provider - let description = card.description.trimmingCharacters(in: .whitespacesAndNewlines) + let description = try! SwiftSoup.parseBodyFragment(card.description).text() descriptionLabel.text = description descriptionLabel.isHidden = description.isEmpty diff --git a/Tusker/Views/Status/StatusCardView.swift b/Tusker/Views/Status/StatusCardView.swift index a4c89106..dd354ba4 100644 --- a/Tusker/Views/Status/StatusCardView.swift +++ b/Tusker/Views/Status/StatusCardView.swift @@ -10,6 +10,7 @@ import UIKit import Pachyderm import SafariServices import WebURLFoundationExtras +import SwiftSoup class StatusCardView: UIView { @@ -156,7 +157,7 @@ class StatusCardView: UIView { titleLabel.text = title titleLabel.isHidden = title.isEmpty - let description = card.description.trimmingCharacters(in: .whitespacesAndNewlines) + let description = try! SwiftSoup.parseBodyFragment(card.description).text() descriptionLabel.text = description descriptionLabel.isHidden = description.isEmpty