File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ matrix:
2222 - os : linux
2323 dist : trusty
2424 sudo : required
25- env : SWIFT_SNAPSHOT=4.0-DEVELOPMENT-SNAPSHOT-2017-06-29 -a
25+ env : SWIFT_SNAPSHOT=4.0-DEVELOPMENT-SNAPSHOT-2017-08-15 -a
2626 - os : osx
2727 osx_image : xcode8.3
2828 sudo : required
2929 - os : osx
3030 osx_image : xcode9
3131 sudo : required
32- env : SWIFT_SNAPSHOT=4.0-DEVELOPMENT-SNAPSHOT-2017-06-29 -a
32+ env : SWIFT_SNAPSHOT=4.0-DEVELOPMENT-SNAPSHOT-2017-08-15 -a
3333
3434before_install :
3535 - git clone https://github.com/IBM-Swift/Package-Builder.git
Original file line number Diff line number Diff line change @@ -171,11 +171,13 @@ public extension String {
171171 else {
172172 // false alarm, not a character reference
173173 // move back to invalid state
174- entityPrefix = " "
175174 state = . Invalid
176175
177176 // move the consumed & and current unicode to result buffer
178177 str += entityPrefix + unicodeAsString
178+
179+ // clear entityPrefix buffer
180+ entityPrefix = " "
179181 }
180182 case . Number:
181183 // previously parsed &#
Original file line number Diff line number Diff line change @@ -283,6 +283,9 @@ class HTMLEntitiesTests: XCTestCase {
283283 XCTFail ( " Wrong error thrown " )
284284 }
285285
286+ // unit test for fix to https://github.com/IBM-Swift/swift-html-entities/issues/29
287+ XCTAssertEqual ( " &+한 " . htmlUnescape ( ) , " &+한 " )
288+
286289 // test various parse errors
287290 XCTAssertEqual ( try " &∾̳ " . htmlUnescape ( strict: true ) , " &∾̳ " )
288291 XCTAssertEqual ( " &#∾̳ " . htmlUnescape ( ) , " &#∾̳ " )
You can’t perform that action at this time.
0 commit comments