3 ms·
I dunno, I think the correct answer for the specific code is a one-line ternary: class SanitizingFilter < HTMLFilter def render_element(name, attrs, cont
by dragonwriter 6y ago
I dunno, I think the correct answer for the specific code is a one-line ternary:
class SanitizingFilter < HTMLFilter
def render_element(name, attrs, content)
safe?(name, attrs) ? super : nil
end
end