RenderRichText neutralises unsafe link URLs (safeHref)
Payload's link converter rendered fields.url as is; javascript:/data: URLs stored via import or API reached the href. They now become '#'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7967453f57
commit
1beb0edb7f
@@ -53,6 +53,10 @@ const converters: JSXConvertersFunction = ({ defaultConverters }) => ({
|
||||
Spread `defaultConverters` — nadpisujesz tylko te węzły, które chcesz. Reszta
|
||||
(listy, tabele, obrazy, linki) działa z oficjalnej obsługi Payload.
|
||||
|
||||
**Linki są filtrowane jak w `<CMSLink>` (`safeHref`).** Własny link z adresem spoza `http(s)`,
|
||||
`mailto`, `tel`, `sms`, `#`, `/` (np. `javascript:`, `data:`) dostaje `href="#"` — także gdy trafił
|
||||
do bazy importem, seedem albo przez API, z pominięciem pola w panelu.
|
||||
|
||||
## Spis treści i kotwice nagłówków (1.11.1)
|
||||
|
||||
Długie dokumenty (polityka prywatności, regulamin) — spis treści z linkami do sekcji.
|
||||
|
||||
Reference in New Issue
Block a user