Skip to content

Fix escaping of ampersands #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
/.build
/Packages
**xcuserdata/
2 changes: 1 addition & 1 deletion Sources/XMLParsing/XMLStackParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public struct XMLHeader {

internal class _XMLElement {
static let attributesKey = "___ATTRIBUTES"
static let escapedCharacterSet = [("&", "&amp"), ("<", "&lt;"), (">", "&gt;"), ( "'", "&apos;"), ("\"", "&quot;")]
static let escapedCharacterSet = [("&", "&amp;"), ("<", "&lt;"), (">", "&gt;"), ( "'", "&apos;"), ("\"", "&quot;")]

var key: String
var value: String? = nil
Expand Down
10 changes: 7 additions & 3 deletions XMLParsing.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
name = Products;
sourceTree = BUILT_PRODUCTS_DIR;
};
OBJ_5 /* */ = {
OBJ_5 = {
isa = PBXGroup;
children = (
OBJ_6 /* Package.swift */,
Expand All @@ -140,7 +140,6 @@
OBJ_26 /* Sample XML */,
OBJ_27 /* Products */,
);
name = "";
sourceTree = "<group>";
};
OBJ_7 /* Sources */ = {
Expand Down Expand Up @@ -247,9 +246,10 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = OBJ_5 /* */;
mainGroup = OBJ_5;
productRefGroup = OBJ_27 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -420,7 +420,9 @@
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = XMLParsing.xcodeproj/XMLParsing_Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = XMLParsing;
Expand All @@ -442,7 +444,9 @@
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = XMLParsing.xcodeproj/XMLParsing_Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = XMLParsing;
Expand Down