From 1d6a04ca8e899134b63fd4a8c73aa5ba458ea2a1 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 20 Dec 2019 13:13:41 +0100 Subject: [PATCH] Fix counter --- templates/fediplan/schedule.html.twig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/fediplan/schedule.html.twig b/templates/fediplan/schedule.html.twig index 5ffc988..b445244 100644 --- a/templates/fediplan/schedule.html.twig +++ b/templates/fediplan/schedule.html.twig @@ -446,8 +446,9 @@ $("#compose_content").keyup(function(){ inputText = $(this).val(); inputText = inputText - .replace(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g, 'xxxxxxxxxxxxxxxxxxxxxxx') - .replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig, '$1@$3'); + .replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9.-]+[a-z0-9]+)/ig, '$1@$3') + .replace(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)/g, 'xxxxxxxxxxxxxxxxxxxxxxx'); + $("#count").text(inputText.length); });