about summary refs log tree commit diff
path: root/app/validators/status_length_validator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/validators/status_length_validator.rb')
-rw-r--r--app/validators/status_length_validator.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
index 11997024f..2a3ac8862 100644
--- a/app/validators/status_length_validator.rb
+++ b/app/validators/status_length_validator.rb
@@ -2,7 +2,8 @@
 
 class StatusLengthValidator < ActiveModel::Validator
   MAX_CHARS = (ENV['MAX_TOOT_CHARS'] || 500).to_i
-  URL_PLACEHOLDER = "\1#{'x' * 23}"
+  URL_PLACEHOLDER_CHARS = 23
+  URL_PLACEHOLDER = "\1#{'x' * URL_PLACEHOLDER_CHARS}"
 
   def validate(status)
     return unless status.local? && !status.reblog?