diff options
author | David Yip <yipdw@member.fsf.org> | 2018-02-04 16:36:19 -0600 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-02-04 16:36:19 -0600 |
commit | a6fb1c58eead1357a307813c69f798f32bcf7cae (patch) | |
tree | d56d2721705d86a925279a737943cbaa28a60979 /app/validators | |
parent | 530fcc1c14d2b7a38c1b734c0b18955f109f0f20 (diff) | |
parent | 38e0133e1b01c21a710111097102a6eb205b9b9b (diff) |
Merge remote-tracking branch 'origin/master' into merge-upstream
Conflicts: .env.production.sample app/controllers/auth/confirmations_controller.rb db/schema.rb
Diffstat (limited to 'app/validators')
-rw-r--r-- | app/validators/status_length_validator.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb index 79d17742a..2db9b29f6 100644 --- a/app/validators/status_length_validator.rb +++ b/app/validators/status_length_validator.rb @@ -23,6 +23,8 @@ class StatusLengthValidator < ActiveModel::Validator end def countable_text(status) + return '' if status.text.nil? + status.text.dup.tap do |new_text| new_text.gsub!(FetchLinkCardService::URL_PATTERN, 'x' * 23) new_text.gsub!(Account::MENTION_RE, '@\2') |