From 0347de1e33a35f06f5cb541794d58b72e6f0f38c Mon Sep 17 00:00:00 2001 From: Justin Donofrio Date: Thu, 7 Nov 2024 10:28:45 -0500 Subject: [PATCH] Remove trailing periods on windows Closes: https://github.com/justin025/onthespot/issues/49 --- src/onthespot/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/onthespot/utils.py b/src/onthespot/utils.py index abb6042..7321754 100644 --- a/src/onthespot/utils.py +++ b/src/onthespot/utils.py @@ -49,6 +49,8 @@ def sanitize_data(value, allow_path_separators=False, escape_quotes=False): value = value.replace('<', char) value = value.replace('>', char) value = value.replace('|', char) + while value.endswith('.'): + value = value[:-1] else: value = value.replace('/', char) return value