Skip to content

Commit

Permalink
fix #300 Html entities in title
Browse files Browse the repository at this point in the history
  • Loading branch information
bourvill committed Jun 19, 2020
1 parent fdd6414 commit 205e26e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
17 changes: 17 additions & 0 deletions wallabag.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
9C5EDEEA234E889100141DFD /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C5EDEE9234E889100141DFD /* AboutView.swift */; };
9C5EDF00234E937100141DFD /* Swinject in Frameworks */ = {isa = PBXBuildFile; productRef = 9C5EDEFF234E937100141DFD /* Swinject */; };
9C5EDF08234E982600141DFD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9C5EDF07234E982600141DFD /* LaunchScreen.storyboard */; };
9C6038A8249CC1E900F4FD2D /* HTMLEntities in Frameworks */ = {isa = PBXBuildFile; productRef = 9C6038A7249CC1E900F4FD2D /* HTMLEntities */; };
9C60DE2523606DAA00F78D02 /* TagRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C60DE2423606DAA00F78D02 /* TagRow.swift */; };
9C66B6BD235667770068B968 /* AppSync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C66B6BC235667770068B968 /* AppSync.swift */; };
9C66B6C2235678780068B968 /* RetrieveModePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C66B6C1235678780068B968 /* RetrieveModePicker.swift */; };
Expand Down Expand Up @@ -385,6 +386,7 @@
files = (
9C22CED82430B64D00B2C69F /* Logging in Frameworks */,
9C677CAD227EF5A6006C7112 /* WebKit.framework in Frameworks */,
9C6038A8249CC1E900F4FD2D /* HTMLEntities in Frameworks */,
9C5EDF00234E937100141DFD /* Swinject in Frameworks */,
9C6C37502477D6F200D2228F /* WallabagKit in Frameworks */,
9CCF9327242D13FF00904D3B /* SwiftyLogger in Frameworks */,
Expand Down Expand Up @@ -973,6 +975,7 @@
9CCF9326242D13FF00904D3B /* SwiftyLogger */,
9C22CED72430B64D00B2C69F /* Logging */,
9C6C374F2477D6F200D2228F /* WallabagKit */,
9C6038A7249CC1E900F4FD2D /* HTMLEntities */,
);
productName = wallabag;
productReference = FR_7EF8E3725DA0867206C920EE5FBF277C /* wallabag.app */;
Expand Down Expand Up @@ -1042,6 +1045,7 @@
9C5EDEFE234E937100141DFD /* XCRemoteSwiftPackageReference "Swinject" */,
9CCF9325242D13FF00904D3B /* XCRemoteSwiftPackageReference "SwiftyLogger" */,
9C22CED62430B64D00B2C69F /* XCRemoteSwiftPackageReference "swift-log" */,
9C6038A6249CC1E900F4FD2D /* XCRemoteSwiftPackageReference "swift-html-entities" */,
);
productRefGroup = G_F9352AEEBDAE1173F665BDBED628DF2A /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1797,6 +1801,14 @@
minimumVersion = 2.7.1;
};
};
9C6038A6249CC1E900F4FD2D /* XCRemoteSwiftPackageReference "swift-html-entities" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/IBM-Swift/swift-html-entities.git";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 3.0.14;
};
};
9CCF9325242D13FF00904D3B /* XCRemoteSwiftPackageReference "SwiftyLogger" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/district-web/SwiftyLogger";
Expand All @@ -1818,6 +1830,11 @@
package = 9C5EDEFE234E937100141DFD /* XCRemoteSwiftPackageReference "Swinject" */;
productName = Swinject;
};
9C6038A7249CC1E900F4FD2D /* HTMLEntities */ = {
isa = XCSwiftPackageProductDependency;
package = 9C6038A6249CC1E900F4FD2D /* XCRemoteSwiftPackageReference "swift-html-entities" */;
productName = HTMLEntities;
};
9C6C374F2477D6F200D2228F /* WallabagKit */ = {
isa = XCSwiftPackageProductDependency;
productName = WallabagKit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"object": {
"pins": [
{
"package": "HTMLEntities",
"repositoryURL": "https://github.com/IBM-Swift/swift-html-entities.git",
"state": {
"branch": null,
"revision": "744c094976355aa96ca61b9b60ef0a38e979feb7",
"version": "3.0.14"
}
},
{
"package": "swift-log",
"repositoryURL": "https://github.com/apple/swift-log",
Expand Down
3 changes: 2 additions & 1 deletion wallabag/Component/Entry/EntryRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Marinel Maxime on 17/07/2019.
//

import HTMLEntities
import SwiftUI

struct EntryRowView: View {
Expand All @@ -14,7 +15,7 @@ struct EntryRowView: View {
HStack {
EntryPicture(url: entry.previewPicture).frame(width: 50, height: 50, alignment: .center)
VStack(alignment: .leading) {
Text(entry.title ?? "")
Text(entry.title?.htmlUnescape() ?? "")
.font(.headline)
Text(String(format: "Reading time %@".localized, arguments: [Int(entry.readingTime).readingTime]))
.font(.footnote)
Expand Down
3 changes: 2 additions & 1 deletion wallabag/Component/Entry/EntryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import CoreData
import HTMLEntities
import SwiftUI

struct EntryView: View {
Expand All @@ -21,7 +22,7 @@ struct EntryView: View {
}, label: {
Text("Back")
})
Text(entry.title ?? "Entry")
Text(entry.title?.htmlUnescape() ?? "Entry")
.font(.title)
.fontWeight(.black)
.lineLimit(1)
Expand Down

0 comments on commit 205e26e

Please sign in to comment.