about summary refs log tree commit diff
path: root/app/validators
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-07-11 22:38:06 +0200
committerGitHub <noreply@github.com>2021-07-11 22:38:06 +0200
commit0c6dfcf3de83ef9595b95c5d2d6fc116fe319861 (patch)
tree630fca746dc138284eb7402c878f212578ebd74c /app/validators
parentf040b9aee3f84cb3ba8926fed81d47df3f1094a7 (diff)
parentcdf20f4367226bc5682a0b040fa62f56d6f58fb5 (diff)
Merge pull request #1563 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/validators')
-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?