You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A snippet from textilize method, note that html_safe is being called on the return value of the if block. Which means it will be called even if "" is returned, which is unnecessary.
if text.blank?
""
else
textilized = RedCloth.new(text, options)
textilized.to_html
end.html_safe
The text was updated successfully, but these errors were encountered:
That is the desired behavior. If we don't call html_safe on the blank string it will be sanitized, which is unnecessary because the string obviously is safe.
A snippet from textilize method, note that html_safe is being called on the return value of the if block. Which means it will be called even if "" is returned, which is unnecessary.
The text was updated successfully, but these errors were encountered: