Remove anchor tag from images

This commit is contained in:
Maurice Parker 2020-05-12 05:06:16 -05:00
parent 98ffbfd99b
commit cf91632d4a

View File

@ -127,14 +127,14 @@ final class RedditLinkData: Codable {
} }
if let imageSource = preview?.images?.first?.source, let imageURL = imageSource.url { if let imageSource = preview?.images?.first?.source, let imageURL = imageSource.url {
var html = "<a href=\"\(url)\"><img src=\"\(imageURL)\" " var html = "<img src=\"\(imageURL)\" "
if postHint == "link" { if postHint == "link" {
html += "class=\"nnw-nozoom\" " html += "class=\"nnw-nozoom\" "
} }
if let width = imageSource.width, let height = imageSource.height { if let width = imageSource.width, let height = imageSource.height {
html += "width=\"\(width)\" height=\"\(height)\" " html += "width=\"\(width)\" height=\"\(height)\" "
} }
html += "></a>" html += ">"
html += linkOutURL(url) html += linkOutURL(url)
return html return html
} }