diff --git a/src/customembed.js b/src/customembed.js index ff87b13d..87f42bd6 100644 --- a/src/customembed.js +++ b/src/customembed.js @@ -20,77 +20,12 @@ function filter(input) { } function getMeta($) { - var tag = $("embed"); - if (tag.length !== 0) { - return filterEmbed(tag[0]); - } - tag = $("object"); - if (tag.length !== 0) { - return filterObject(tag[0]); - } - tag = $("iframe"); + let tag = $("iframe"); if (tag.length !== 0) { return filterIframe(tag[0]); } - throw new Error("Invalid embed. Input must be an '; assert.throws(() => { customembed.filter(input) }, /must be HTTPS/); }); + + it('accepts a valid iframe', () => { + let input = '