From c1ad390194294363589aaf3a89ee10ca003d3cc1 Mon Sep 17 00:00:00 2001 From: itskovacs Date: Sat, 19 Jul 2025 13:16:11 +0200 Subject: [PATCH] :globe_with_meridians: Improve Google Maps variants and protocol-less URL parsing --- backend/trip/__init__.py | 2 +- .../modals/place-create-modal/place-create-modal.component.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/trip/__init__.py b/backend/trip/__init__.py index 6849410..a82b376 100644 --- a/backend/trip/__init__.py +++ b/backend/trip/__init__.py @@ -1 +1 @@ -__version__ = "1.1.0" +__version__ = "1.1.1" diff --git a/src/src/app/modals/place-create-modal/place-create-modal.component.ts b/src/src/app/modals/place-create-modal/place-create-modal.component.ts index 8b3e705..cf1b12c 100644 --- a/src/src/app/modals/place-create-modal/place-create-modal.component.ts +++ b/src/src/app/modals/place-create-modal/place-create-modal.component.ts @@ -103,7 +103,9 @@ export class PlaceCreateModalComponent { this.placeForm.get("place")?.valueChanges.subscribe({ next: (value: string) => { - if (value.startsWith("https://www.google.com/maps")) { + const isGoogleMapsURL = + /^(https?:\/\/)?(www\.)?google\.[a-z.]+\/maps/.test(value); + if (isGoogleMapsURL) { this.parseGoogleMapsUrl(value); } },