mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Fixed: When using TinyMce og:image tags were missing for images inserted into the news body. Banner plugin now has a tooltip/description field. Also supports longer URLs avoiding SQL errors. TinyMce upgraded to latest version. (v4.3.2)
This commit is contained in:
@@ -413,8 +413,30 @@ class e_bbcode
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(substr(ltrim($text),0,6) == '[html]' && $type == 'img') // support for html img tags inside [html] bbcode.
|
||||
{
|
||||
$tmp = e107::getParser()->getTags($text,'img');
|
||||
|
||||
if(!empty($tmp['img']))
|
||||
{
|
||||
$mtch = array();
|
||||
foreach($tmp['img'] as $k)
|
||||
{
|
||||
$mtch[1][] = str_replace('"','',trim($k['src']));
|
||||
// echo $k['src']."<br />";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else // regular bbcode;
|
||||
{
|
||||
preg_match_all("/\[".$type."(?:[^\]]*)?]([^\[]*)(?:\[\/".$type."])/im",$text,$mtch);
|
||||
}
|
||||
|
||||
|
||||
preg_match_all("/\[".$type."(?:[^\]]*)?]([^\[]*)(?:\[\/".$type."])/im",$text,$mtch);
|
||||
|
||||
|
||||
$ret = array();
|
||||
|
||||
@@ -423,6 +445,7 @@ class e_bbcode
|
||||
$tp = e107::getParser();
|
||||
foreach($mtch[1] as $i)
|
||||
{
|
||||
|
||||
if(substr($i,0,4)=='http')
|
||||
{
|
||||
$ret[] = $i;
|
||||
@@ -572,7 +595,7 @@ class e_bbcode
|
||||
$doc->loadHTML($html);
|
||||
|
||||
$tmp = $doc->getElementsByTagName($tag);
|
||||
|
||||
|
||||
$var = array();
|
||||
|
||||
$attributes = array('class','style','width','height','src','alt','href');
|
||||
|
Reference in New Issue
Block a user