mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-03 05:13:37 +09:00
Adapt the Lexxy composer to main's link preview hardening
Main strips a javascript: href from a preview node before it's parsed, so tell legacy Trix attachments apart by their filename instead. escapeHTML moved to the string helpers, and the unfurling system test now drives the Lexxy editor.
This commit is contained in:
@@ -20,7 +20,7 @@ class ActionText::Attachment::OpengraphEmbed
|
||||
# and content-type, so newer attachments carry the details in their
|
||||
# content markup instead.
|
||||
def attributes_from_node(node)
|
||||
if node["href"].present?
|
||||
if node["filename"].present?
|
||||
{
|
||||
href: web_url(node["href"]),
|
||||
url: web_url(node["url"]),
|
||||
|
||||
Reference in New Issue
Block a user