diff --git a/plugins/links/iframely-link.js b/plugins/links/iframely-link.js index 02958a9c4..66aabd749 100644 --- a/plugins/links/iframely-link.js +++ b/plugins/links/iframely-link.js @@ -16,7 +16,7 @@ export default { } for (const [key, value] of Object.entries(meta)) { - if (key.indexOf(appname) === 0 || !ignoreIframely && key.indexOf(CONFIG.R.iframely) === 0) { + if (key.indexOf(appname) === 0 || (!ignoreIframely && key.indexOf(CONFIG.R.iframely) === 0)) { links = links.concat( utils.parseMetaLinks( key, diff --git a/plugins/links/utils.js b/plugins/links/utils.js index 7d2d52d48..631d67e29 100644 --- a/plugins/links/utils.js +++ b/plugins/links/utils.js @@ -90,8 +90,12 @@ export default { // Filter empty. rels = rels.filter(i => i); + var isAllowed = whitelistRecord.isAllowed('html-meta.iframely') // New check. + || whitelistRecord.isAllowed('iframely.app'); // Old check + + // If no additional rels specified, try add 'app'. if (!rels.some(rel => CONFIG.REL_GROUPS && CONFIG.REL_GROUPS.includes(rel))) { - if (whitelistRecord.isAllowed('iframely.app') + if (isAllowed && /iframely/i.test(key) || (appname && key.indexOf(appname) === 0)) { // Allow -1; + + if (!isAllowed && !isAllowedByRels) { return []; } + + // Add resizable rel. + if (rels.indexOf(CONFIG.R.resizable) === -1 && whitelistRecord.isAllowed('html-meta.iframely', CONFIG.R.resizable)) { + rels.push(CONFIG.R.resizable); + } } var links = [];