From 9106bbf7dc41918fc31cdadbdd2679873bea3471 Mon Sep 17 00:00:00 2001 From: garmoncheg Date: Wed, 25 Feb 2026 19:59:02 +0200 Subject: [PATCH 1/3] Fix iframely links data mixed with meta --- plugins/links/iframely-link.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/links/iframely-link.js b/plugins/links/iframely-link.js index 2d8d615ad..b23fdd9f4 100644 --- a/plugins/links/iframely-link.js +++ b/plugins/links/iframely-link.js @@ -17,8 +17,20 @@ export default { for (const [key, v] of Object.entries(meta)) { if (key.indexOf(appname) === 0 || (!ignoreIframely && key.indexOf(CONFIG.R.iframely) === 0)) { - - const value = typeof(v) === 'string' ? {href: v} : v; // If link has no `media` and no `type` attributes, HTMLMetaHandler assigns the value=href; + + let value; + if (typeof v === 'string') { + // If link has no `media` and no `type` attributes, HTMLMetaHandler assigns the value=href; + value = { + href: v + }; + } else if (v.href) { + // Ready link data. + value = v; + } else { + // Non link. Skip. + continue + } let wlr = whitelistRecord; if (whitelistRecord.isDefault From 30f46a60d23bc9e0f7f13b4bca0c2efbe12bd25d Mon Sep 17 00:00:00 2001 From: Ivan Paramonau Date: Thu, 26 Feb 2026 08:52:27 -0500 Subject: [PATCH 2/3] Revert "Fix iframely links data mixed with meta" This reverts commit 9106bbf7dc41918fc31cdadbdd2679873bea3471. --- plugins/links/iframely-link.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/plugins/links/iframely-link.js b/plugins/links/iframely-link.js index b23fdd9f4..2d8d615ad 100644 --- a/plugins/links/iframely-link.js +++ b/plugins/links/iframely-link.js @@ -17,20 +17,8 @@ export default { for (const [key, v] of Object.entries(meta)) { if (key.indexOf(appname) === 0 || (!ignoreIframely && key.indexOf(CONFIG.R.iframely) === 0)) { - - let value; - if (typeof v === 'string') { - // If link has no `media` and no `type` attributes, HTMLMetaHandler assigns the value=href; - value = { - href: v - }; - } else if (v.href) { - // Ready link data. - value = v; - } else { - // Non link. Skip. - continue - } + + const value = typeof(v) === 'string' ? {href: v} : v; // If link has no `media` and no `type` attributes, HTMLMetaHandler assigns the value=href; let wlr = whitelistRecord; if (whitelistRecord.isDefault From 1e63c899d18808aed46192656da75565557d3070 Mon Sep 17 00:00:00 2001 From: Ivan Paramonau Date: Thu, 26 Feb 2026 08:56:00 -0500 Subject: [PATCH 3/3] refactor the check for iframely meta in links --- plugins/links/iframely-link.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/plugins/links/iframely-link.js b/plugins/links/iframely-link.js index 2d8d615ad..a9b79636c 100644 --- a/plugins/links/iframely-link.js +++ b/plugins/links/iframely-link.js @@ -20,21 +20,23 @@ export default { const value = typeof(v) === 'string' ? {href: v} : v; // If link has no `media` and no `type` attributes, HTMLMetaHandler assigns the value=href; - let wlr = whitelistRecord; - if (whitelistRecord.isDefault - && !Array.isArray(value) && value.href && /^(?:https?:)?\/\//.test(value.href) - && (!value.type || value.type === CONFIG.T.text_html)) { - wlr = options.getWhitelistRecord(value.href, {exclusiveRel: 'html-meta'}); + if (value.href) { // else it's not a link, it is Iframely-optimized meta fields ("iframely:title", etc.) + let wlr = whitelistRecord; + if (whitelistRecord.isDefault + && !Array.isArray(value) && value.href && /^(?:https?:)?\/\//.test(value.href) + && (!value.type || value.type === CONFIG.T.text_html)) { + wlr = options.getWhitelistRecord(value.href, {exclusiveRel: 'html-meta'}); + } + + links = links.concat( + utils.parseMetaLinks( + key, + value, + wlr, + ignoreIframely && appname + ) + ); } - - links = links.concat( - utils.parseMetaLinks( - key, - value, - wlr, - ignoreIframely && appname - ) - ); } }