Merge pull request #1259 from virtualtam/fix/render/strip-opengraph-description
fix: ensure HTML tags are stripped from OpenGraph description
This commit is contained in:
commit
586a9e0065
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:url" content="{$index_url}?{$link.shorturl}" />
|
<meta property="og:url" content="{$index_url}?{$link.shorturl}" />
|
||||||
{$ogDescription=isset($link.description_src) ? $link.description_src : $link.description}
|
{$ogDescription=isset($link.description_src) ? $link.description_src : $link.description}
|
||||||
<meta property="og:description" content="{function="substr($ogDescription, 0, 300)"}" />
|
<meta property="og:description" content="{function="substr(strip_tags($ogDescription), 0, 300)"}" />
|
||||||
{if="$link.thumbnail"}
|
{if="$link.thumbnail"}
|
||||||
<meta property="og:image" content="{$index_url}{$link.thumbnail}" />
|
<meta property="og:image" content="{$index_url}{$link.thumbnail}" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:url" content="{$index_url}?{$link.shorturl}" />
|
<meta property="og:url" content="{$index_url}?{$link.shorturl}" />
|
||||||
{$ogDescription=isset($link.description_src) ? $link.description_src : $link.description}
|
{$ogDescription=isset($link.description_src) ? $link.description_src : $link.description}
|
||||||
<meta property="og:description" content="{function="mb_substr($ogDescription, 0, 300)"}" />
|
<meta property="og:description" content="{function="mb_substr(strip_tags($ogDescription), 0, 300)"}" />
|
||||||
{if="$link.thumbnail"}
|
{if="$link.thumbnail"}
|
||||||
<meta property="og:image" content="{$index_url}{$link.thumbnail}" />
|
<meta property="og:image" content="{$index_url}{$link.thumbnail}" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue