From e183e3a7bbe2908b2726da8553e30051ea5ab88f Mon Sep 17 00:00:00 2001 From: erew123 <35898566+erew123@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:36:33 +0000 Subject: [PATCH] Filtering Demo page removed some of the demo filtering as it was stripping too much from the text. --- templates/admin.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/admin.html b/templates/admin.html index c90bfb1..8cd74f8 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -415,11 +415,11 @@ let textInput = formData.get('text'); let cleanedText = textInput.replace(/ \- | \– /g, ' '); // Replace hyphens cleanedText = cleanedText.replace(/%/g, " percent"); - cleanedText = cleanedText.replace(/([!?.])\1+/g, '$1'); + //cleanedText = cleanedText.replace(/([!?.])\1+/g, '$1'); cleanedText = cleanedText.replace(/[^a-zA-Z0-9\s\.,;:!?\-\'"]/g, ''); cleanedText = cleanedText.replace(/\n+/g, ' '); cleanedText = cleanedText.replace(/\.\s'/g, ".'"); // Remove space between period and single quote - cleanedText = cleanedText.replace(/'/g, ""); // Remove all single quotes + //cleanedText = cleanedText.replace(/'/g, ""); // Remove all single quotes // Set the cleaned text back to the form data formData.set('text', cleanedText);