diff --git a/release-notes/unreleased/3058-fix-truncated-links-in-push-notifications.yml b/release-notes/unreleased/3058-fix-truncated-links-in-push-notifications.yml deleted file mode 100644 index 980d066d5f..0000000000 --- a/release-notes/unreleased/3058-fix-truncated-links-in-push-notifications.yml +++ /dev/null @@ -1,8 +0,0 @@ -issue_key: 3058 -show_in_stores: true -platforms: - - ios - - android - - web -en: Fixed an issue with truncated links in local news -de: Ein Problem mit abgeschnittenen Links in lokalen Nachrichten wurde behoben diff --git a/shared/utils/__tests__/replaceLinks.spec.ts b/shared/utils/__tests__/replaceLinks.spec.ts index 8c46b3886b..7c004c1d43 100644 --- a/shared/utils/__tests__/replaceLinks.spec.ts +++ b/shared/utils/__tests__/replaceLinks.spec.ts @@ -31,11 +31,6 @@ describe('replaceLinks', () => { expect(replace).toHaveBeenCalledTimes(1) expect(replace).toHaveReturnedWith('https://integreat.app/asdf') }) - it('should match "_2025.pdf"', () => { - replaceLinks('some content https://bildung-test.de/fileadmin/media/pdf/test_2024.pdf', replace) - expect(replace).toHaveBeenCalledTimes(1) - expect(replace).toHaveReturnedWith('https://bildung-test.de/fileadmin/media/pdf/test_2024.pdf') - }) it('should match arabic non-ASCII chars in pathname, query and hash', () => { replaceLinks( diff --git a/shared/utils/replaceLinks.ts b/shared/utils/replaceLinks.ts index c42f69e1bf..7d05751c18 100644 --- a/shared/utils/replaceLinks.ts +++ b/shared/utils/replaceLinks.ts @@ -7,7 +7,7 @@ const unicode = 'a-zA-Z0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF' const protocol = /([A-Za-z]{3,9}:(?:\/\/)?)/ const hostname = /(?:[-;:&=+$,\w]+@)?([A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*)/ // language=RegExp -const path = `(?:\\/(?:[+~%/_.${unicode}-]*[+~%/${unicode}-]+)?)?` +const path = `(?:\\/(?:[+~%/.${unicode}-]*[+~%/${unicode}-]+)?)?` // language=RegExp const query = `(?:\\?([-+=&;%@.${unicode}]*[-+=&;%@${unicode}]+)?)?` // language=RegExp