mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 01:40:22 +00:00
Handle < in title that is not used as beginning of HTML tag.
This commit is contained in:
1 parent
3a948b7556
commit
de464b6a34
3 files changed
+49
-12
No files matched your search
@@ -109,4 +109,14 @@ import UIKit
|
||||
XCTAssertEqual(s.string, "[NSFW]")
|
||||
}
|
||||
|
||||
// #4742: a title with a literal `<` followed by non-tag text must
|
||||
// render in full in the timeline — not truncated at the `<`, and with
|
||||
// no spurious trailing `>`.
|
||||
func testLiteralLessThanTitleIsNotTruncated() {
|
||||
let input = "No place in children's hands: <16s in UK to be banned"
|
||||
let sanitized = ArticleStringFormatter.sanitizedTitle(input, forHTML: true)!
|
||||
let s = NSAttributedString(simpleHTML: sanitized)
|
||||
XCTAssertEqual(s.string, "No place in children's hands: <16s in UK to be banned")
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user