From 6e34313aaf1f3d7c72ffe70220b43896830b4c96 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Sun, 1 Jan 2023 12:17:48 +0900 Subject: [PATCH] Fix incorrect character count (#340) --- activities/views/compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activities/views/compose.py b/activities/views/compose.py index 1ca0435..eb27b18 100644 --- a/activities/views/compose.py +++ b/activities/views/compose.py @@ -29,7 +29,6 @@ class Compose(FormView): widget=forms.Textarea( attrs={ "autofocus": "autofocus", - "maxlength": Config.lazy_system_value("post_length"), "placeholder": "What's on your mind?", }, ) @@ -62,7 +61,8 @@ class Compose(FormView): "_" ] = f""" on load or input - set characters to my.value.trim().length + -- Unicode-aware counting to match Python + set characters to Array.from(my.value.trim()).length put {Config.system.post_length} - characters into #character-counter if characters > {Config.system.post_length} then