mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-26 15:46:47 +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:
1 parent
1bb7ef7c17
commit
eab554aa4b
3 files changed
+5
-17
No files matched your search
@@ -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