mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 05:08:09 +08:00
always double check there is a class first
This commit is contained in:
@ -336,7 +336,7 @@ class CookedPostProcessor
|
||||
found = false
|
||||
parent = img
|
||||
while parent = parent.parent
|
||||
if parent["class"].include? "whitelistedgeneric"
|
||||
if parent["class"] && parent["class"].include?("whitelistedgeneric")
|
||||
found = true
|
||||
break
|
||||
end
|
||||
|
Reference in New Issue
Block a user