Fix counter

This commit is contained in:
Thomas 2019-12-20 13:13:41 +01:00
parent d856d913f6
commit 1d6a04ca8e

View file

@ -446,8 +446,9 @@
$("#compose_content").keyup(function(){ $("#compose_content").keyup(function(){
inputText = $(this).val(); inputText = $(this).val();
inputText = inputText 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); $("#count").text(inputText.length);
}); });