Commit Graph

23 Commits

Author SHA1 Message Date
Mike Dalessio 851f13a934 Render inline code in card titles (#2518)
* 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>
2026-02-12 12:07:40 -05:00
Mike Dalessio 9c76002bc1 Completing a step removes stalled status from UI
Add `updatedAt` to stalled bubble options so JS can check if the card
was recently updated, matching the `Card::Stallable#stalled?`
logic. Refresh the bubble via Turbo Stream when a step is updated.

This should have been part of #1625

Fixes https://app.fizzy.do/5986089/cards/3668
2026-01-16 09:58:21 -05:00
Mike Dalessio f952b953e6 Add test coverage for autolinking multiple URLs 2025-12-29 12:21:02 -05:00
Mike Dalessio 97d8d6a395 Add "noopener" to autolinks' rel attribute 2025-12-29 12:21:02 -05:00
Mike Dalessio 4579f7cd61 Avoid string manipulation when autolinking.
Instead, let's use a Loofah scrubber which will create DOM nodes
directly. This should be faster and is a tiny bit simpler, as well as
removing a potential HTML injection vector.

Also, add "noreferrer" to all `mailto:` links (already present on URLs).
2025-12-29 12:21:00 -05:00
Mike Dalessio e9cb2956ee Lightbox uses Stimulus target callbacks instead of data-action
Remove data-action from the sanitizer allowlist to disallow injection
of potentially malicious Stimulus actions in user-provided
content. The lightbox controller now uses imageTarget callbacks to
handle clicks on image links.

Also add the file name as a caption in the light box, and fix the
caption color for dark mode visibility.
2025-12-13 17:06:03 -05:00
Mike Dalessio e0c821f69b Autolinking is more robust
and handles URLs with CGI params, recognizes more (and multiple)
trailing punctuation marks including entity-encoded punctuation like
`&quot;`.
2025-12-10 10:42:24 -05:00
Mike Dalessio c5721b8187 Avoid unescaping characters when auto-linking
which could lead to Nokogiri unintentionally parsing tags from a
previously-escaped text node.
2025-12-10 10:38:43 -05:00
Jason Zimdars f35623b75f Capitalize 2025-11-19 16:47:02 -06:00
Jason Zimdars 67da7cba75 Update test 2025-11-19 16:46:09 -06:00
Jason Zimdars cc9363987f Update test 2025-11-17 17:44:34 -06:00
Stanko K.R. 56c41d45eb Reinstate email changes 2025-11-17 09:12:40 -05:00
Stanko K.R. 34d83aaa7c Fix tests after the removal of memberships 2025-11-17 09:12:40 -05:00
Mike Dalessio 905cf759d8 test: fixing or skipping more tests 2025-11-17 09:11:47 -05:00
Mike Dalessio 90d475245e Update page_title_tag to match JZ's expectations
and add some tests
2025-11-08 11:07:07 -05:00
Mike Dalessio 5f4ee049c6 Fix up hotkeys
ref: https://fizzy.37signals.com/5986089/collections/2/cards/1452
2025-08-28 11:47:45 -04:00
Mike Dalessio 28c4cc7cee test: backfill hotkeys helper tests
and remove support for the unused use case of comma-delimited-strings
2025-08-28 11:44:51 -04:00
Mike Dalessio d2da1dcc06 Make ExcerptHelper work for String inputs 2025-08-11 17:38:24 -04:00
Mike Dalessio d2a0196fe2 Backfill tests for ExcerptHelper 2025-08-11 17:33:19 -04:00
Jorge Manrubia e2939e846c Consistent verb forms 2025-06-03 02:53:03 +02:00
Mike Dalessio 1302fe9da2 Autolinking shouldn't include final punctuation. 2025-06-02 14:16:02 -04:00
Jorge Manrubia 5214a74c03 Autolink emails and URLs at rendering time 2025-06-01 22:24:24 +02:00
Kevin McConnell 564a0f48ae New Rails app 2024-06-21 13:19:56 +01:00