|
|
|
|
@ -106,20 +106,20 @@ OEmbed.getUrlMeta = (url, withFragment) -> |
|
|
|
|
|
|
|
|
|
if content?.body? |
|
|
|
|
metas = {} |
|
|
|
|
content.body.replace /<title>((.|\n)+?)<\/title>/gmi, (meta, title) -> |
|
|
|
|
metas.pageTitle = he.unescape title |
|
|
|
|
content.body.replace /<title[^>]*>([^<]*)<\/title>/gmi, (meta, title) -> |
|
|
|
|
metas.pageTitle ?= he.unescape title |
|
|
|
|
|
|
|
|
|
content.body.replace /<meta[^>]*(?:name|property)=[']([^']*)['][^>]*content=[']([^']*)['][^>]*>/gmi, (meta, name, value) -> |
|
|
|
|
metas[changeCase.camelCase(name)] = he.unescape value |
|
|
|
|
content.body.replace /<meta[^>]*(?:name|property)=[']([^']*)['][^>]*\scontent=[']([^']*)['][^>]*>/gmi, (meta, name, value) -> |
|
|
|
|
metas[changeCase.camelCase(name)] ?= he.unescape value |
|
|
|
|
|
|
|
|
|
content.body.replace /<meta[^>]*(?:name|property)=["]([^"]*)["][^>]*content=["]([^"]*)["][^>]*>/gmi, (meta, name, value) -> |
|
|
|
|
metas[changeCase.camelCase(name)] = he.unescape value |
|
|
|
|
content.body.replace /<meta[^>]*(?:name|property)=["]([^"]*)["][^>]*\scontent=["]([^"]*)["][^>]*>/gmi, (meta, name, value) -> |
|
|
|
|
metas[changeCase.camelCase(name)] ?= he.unescape value |
|
|
|
|
|
|
|
|
|
content.body.replace /<meta[^>]*content=[']([^']*)['][^>]*(?:name|property)=[']([^']*)['][^>]*>/gmi, (meta, value, name) -> |
|
|
|
|
metas[changeCase.camelCase(name)] = he.unescape value |
|
|
|
|
content.body.replace /<meta[^>]*\scontent=[']([^']*)['][^>]*(?:name|property)=[']([^']*)['][^>]*>/gmi, (meta, value, name) -> |
|
|
|
|
metas[changeCase.camelCase(name)] ?= he.unescape value |
|
|
|
|
|
|
|
|
|
content.body.replace /<meta[^>]*content=["]([^"]*)["][^>]*(?:name|property)=["]([^"]*)["][^>]*>/gmi, (meta, value, name) -> |
|
|
|
|
metas[changeCase.camelCase(name)] = he.unescape value |
|
|
|
|
content.body.replace /<meta[^>]*\scontent=["]([^"]*)["][^>]*(?:name|property)=["]([^"]*)["][^>]*>/gmi, (meta, value, name) -> |
|
|
|
|
metas[changeCase.camelCase(name)] ?= he.unescape value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if metas.fragment is '!' and not withFragment? |
|
|
|
|
|