Changeset 4b5223f in Klonkt
- Timestamp:
- 06/25/2026 09:36:24 AM (3 months ago)
- Branches:
- main
- Children:
- 3dd99d3
- Parents:
- 55bba23
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r55bba23 r4b5223f 156 156 } catch { /* non-fatal */ } 157 157 body = body.replace(/\[\[(track|album|playlist):[^\]]+\]\]/gi, ''); 158 // External embeds ([[embed:url]]) → emit the bare URL as a link so Mastodon 159 // renders its OWN preview/player card (YouTube/Spotify/SoundCloud/etc) instead 160 // of federating the raw shortcode text. 161 body = body.replace(/\[\[embed:([^\]]+)\]\]/gi, (mm, raw) => { 162 const u = esc(raw.trim().replace(/&/g, '&')); 163 return `<p><a href="${u}">${u}</a></p>`; 164 }); 158 165 if (hadAudio) { 159 166 const lbl = audioLabels.length ? esc(audioLabels.slice(0, 4).join(', ')) : '';
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)