lib/twitter-text/validation.rb in twitter-text-1.5.0 vs lib/twitter-text/validation.rb in twitter-text-1.6.0
- old
+ new
@@ -1,11 +1,12 @@
module Twitter
module Validation extend self
MAX_LENGTH = 140
DEFAULT_TCO_URL_LENGTHS = {
- :short_url_length => 20,
- :short_url_length_https => 21
+ :short_url_length => 22,
+ :short_url_length_https => 23,
+ :characters_reserved_per_media => 22
}.freeze
# Returns the length of the string as it would be displayed. This is equivilent to the length of the Unicode NFC
# (See: http://www.unicode.org/reports/tr15). This is needed in order to consistently calculate the length of a
# string no matter which actual form was transmitted. For example: