851f13a934
* Remove unused marked JS dependency * Remove unused redcarpet dependency * Render inline code in card titles Add card_html_title helper that HTML-escapes input then converts backtick-wrapped text to <code> elements. Apply to card titles in board preview, card detail, public views, and notification emails. Style inline code elements in titles to match description styling. Co-authored-by: Andy Smith <andy@37signals.com> --------- Co-authored-by: Andy Smith <andy@37signals.com>
12 lines
311 B
Ruby
12 lines
311 B
Ruby
module HtmlHelper
|
|
def format_html(html)
|
|
Loofah::HTML5::DocumentFragment.parse(html).scrub!(AutoLinkScrubber.new).to_html.html_safe
|
|
end
|
|
|
|
def card_html_title(card)
|
|
return card.title if card.title.blank?
|
|
|
|
ERB::Util.html_escape(card.title).gsub(/`([^`]+)`/, '<code>\1</code>').html_safe
|
|
end
|
|
end
|