mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Prefer \A and \z over ^ and $ in regexes (#19936)
This commit is contained in:
committed by
GitHub
parent
f7907a3645
commit
666536cbd1
@@ -136,7 +136,7 @@ module Email
|
||||
|
||||
def message_id_clean(message_id)
|
||||
if message_id.present? && is_message_id_rfc?(message_id)
|
||||
message_id.gsub(/^<|>$/, "")
|
||||
message_id.gsub(/\A<|>\z/, "")
|
||||
else
|
||||
message_id
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user