From ce2c3bdf76c5c9f65786d516cbd673be66f56abc Mon Sep 17 00:00:00 2001 From: Melissa Autumn Date: Wed, 26 Jun 2024 11:25:56 -0700 Subject: [PATCH] Update regex to allow for spaces and plus signs, and remove the hash before booking. --- backend/src/appointment/utils.py | 2 +- frontend/src/views/BookingView.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/appointment/utils.py b/backend/src/appointment/utils.py index dd473738f..4c5850a0b 100644 --- a/backend/src/appointment/utils.py +++ b/backend/src/appointment/utils.py @@ -46,7 +46,7 @@ def setup_encryption_engine(): def retrieve_user_url_data(url): """Retrieves username, signature, and main url from ///""" - pattern = r"[\/]([\w\d\-_\.\@!]+)[\/]?([\w\d\-_\.\@!]*)[\/]?$" + pattern = r"[\/]([\w\d\-_\.\@!\+\%]+)[\/]?([\w\d\-_\.\@!\+]*)[\/]?$" match = re.findall(pattern, url) if match is None or len(match) == 0: diff --git a/frontend/src/views/BookingView.vue b/frontend/src/views/BookingView.vue index 9e1c1735e..596d1de28 100644 --- a/frontend/src/views/BookingView.vue +++ b/frontend/src/views/BookingView.vue @@ -183,9 +183,10 @@ const bookEvent = async (attendeeData) => { attendee: attendeeData, }; + const url = window.location.href.split('#')[0]; const request = call('schedule/public/availability/request').put({ s_a: obj, - url: window.location.href, + url, }); // Data should just be true here.