Strip common punctuations from URLs
Changelog-Fixed: Fix punctuation getting included in some urls Closes: #575
This commit is contained in:
committed by
William Casarin
parent
bb9fc6f905
commit
f0df4aa218
@@ -148,6 +148,14 @@ class damusTests: XCTestCase {
|
||||
XCTAssertEqual(parsed[0].is_text, testString)
|
||||
}
|
||||
|
||||
func testNoParseUrlTrailingCharacters() {
|
||||
let testString = "https://foo.bar, "
|
||||
let parsed = parse_mentions(content: testString, tags: [])
|
||||
|
||||
XCTAssertNotNil(parsed)
|
||||
XCTAssertEqual(parsed[0].is_url?.absoluteString, "https://foo.bar")
|
||||
}
|
||||
|
||||
func testParseMentionBlank() {
|
||||
let parsed = parse_mentions(content: "", tags: [["e", "event_id"]])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user