From a7dc1eb1f124e1c8af3812bc26f89d95c6b064ee Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Sun, 21 Feb 2021 16:04:46 -0800 Subject: [PATCH] Fix nbsp --- Mastodon/Sources/Mastodon/Entities/HTML.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mastodon/Sources/Mastodon/Entities/HTML.swift b/Mastodon/Sources/Mastodon/Entities/HTML.swift index c76caa4..a8327be 100644 --- a/Mastodon/Sources/Mastodon/Entities/HTML.swift +++ b/Mastodon/Sources/Mastodon/Entities/HTML.swift @@ -59,7 +59,8 @@ private final class HTMLParser: NSObject { init(string: String) { rawString = Self.openingContainerTag - .appending(string.replacingOccurrences(of: "
", with: "
")) + .appending(string.replacingOccurrences(of: "
", with: "
") + .replacingOccurrences(of: " ", with: " ")) .appending(Self.closingContainerTag) parser = XMLParser(data: Data(rawString.utf8)) parseStopColumn = rawString.count - Self.closingContainerTag.count