Skip to content

Commit

Permalink
Parse language tags in description if ExtendedDescription plugin is a…
Browse files Browse the repository at this point in the history
…vailable.
  • Loading branch information
cmairet committed Feb 15, 2017
1 parent 9c230bd commit 7646cf1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/events.inc.php
Expand Up @@ -8,6 +8,10 @@

if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');

// Try using Extended Descriptions to sanitize multi-lingual description tag.
if (defined('EXTENDED_DESC_PATH'))
include_once(EXTENDED_DESC_PATH . 'include/events.inc.php');

class TwitterCard
{
function twittercard_load ($content)
Expand All @@ -28,6 +32,9 @@ function twittercard_load ($content)
$title= str_replace('"', '\"',$row['name']);
$description= str_replace('"', '\"',$row['comment']);

// Parse language tags in description if possible.
if (function_exists('get_user_language_desc'))
$description = get_user_language_desc($description);

// Check if folder exists
$thumbFolder = PHPWG_PLUGINS_PATH . basename(dirname(dirname(__FILE__))) . '/thumbs/' . dirname($url);
Expand Down

0 comments on commit 7646cf1

Please sign in to comment.