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:
Stanko K.R.
2026-09-26 09:26:53 +02:00
parent 1bb7ef7c17
commit eab554aa4b
3 changed files with 5 additions and 17 deletions
@@ -1,7 +1,6 @@
import { Controller } from "@hotwired/stimulus"
import { post } from "@rails/request.js"
import { truncateString } from "helpers/string_helpers"
import { escapeHTML } from "helpers/dom_helpers"
import { escapeHTML, truncateString } from "helpers/string_helpers"
const OPENGRAPH_EMBED_CONTENT_TYPE = "application/vnd.actiontext.opengraph-embed"