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
@@ -98,7 +98,7 @@ class ShrinkUploadedImage
|
||||
elsif !post.topic || post.topic.trashed?
|
||||
log "A deleted topic"
|
||||
elsif post.cooked.include?(original_upload.sha1)
|
||||
if post.raw.include?("#{Discourse.base_url.sub(%r{^https?://}i, "")}/t/")
|
||||
if post.raw.include?("#{Discourse.base_url.sub(%r{\Ahttps?://}i, "")}/t/")
|
||||
log "Updating a topic onebox"
|
||||
else
|
||||
log "Updating an external onebox"
|
||||
|
||||
Reference in New Issue
Block a user