From 7224235766d679303ed944213c1b5a22d1978921 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 12 Aug 2024 15:16:28 +0000 Subject: [PATCH] Merge pull request #1392 from planetary-social/bdm/1233 fix: urls with periods after them include the period and don't work as expected #1233 --- CHANGELOG.md | 1 + Nos/Models/URLParser.swift | 2 +- NosTests/URLParserTests.swift | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cf15a2c9..7ff5c6974 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - Fixed an issue where the sheet asking users to set up a NIP-05 username would appear after reinstalling Nos, even if the profile already had a NIP-05 username. +- Fixed a bug where urls with periods after them would include the period. ## [0.1.24] - 2024-08-09Z diff --git a/Nos/Models/URLParser.swift b/Nos/Models/URLParser.swift index dddc8262e..0ec1279b3 100644 --- a/Nos/Models/URLParser.swift +++ b/Nos/Models/URLParser.swift @@ -54,7 +54,7 @@ struct URLParser { // https://en.wikipedia.org/wiki/Domain_Name_System#Domain_name_syntax,_internationalization // swiftlint:disable:next line_length - let regexPattern = "(\\s*)(?((https?://){1}|(?((https?://){1}|(?