Added Thai diacritics and tone marks in HASHTAG_INVALID_CHARS_RE (#26576)

This commit is contained in:
ppnplus authored and GitHub committed 2023-11-14 15:33:59 +00:00
1 parent 7e1a77ea51
commit 2b038b4f89
1 file changed
+1 -1
+1 -1
View File
@@ -37,7 +37,7 @@ class Tag < ApplicationRecord
HASHTAG_RE = %r{(?<![=/)\w])#(#{HASHTAG_NAME_PAT})}i
HASHTAG_NAME_RE = /\A(#{HASHTAG_NAME_PAT})\z/i
HASHTAG_INVALID_CHARS_RE = /[^[:alnum:]#{HASHTAG_SEPARATORS}]/
HASHTAG_INVALID_CHARS_RE = /[^[:alnum:]\u0E47-\u0E4E#{HASHTAG_SEPARATORS}]/
validates :name, presence: true, format: { with: HASHTAG_NAME_RE }
validates :display_name, format: { with: HASHTAG_NAME_RE }