diff --git a/e107_core/shortcodes/batch/bbcode_shortcodes.php b/e107_core/shortcodes/batch/bbcode_shortcodes.php
index adf996190..b97e16c35 100644
--- a/e107_core/shortcodes/batch/bbcode_shortcodes.php
+++ b/e107_core/shortcodes/batch/bbcode_shortcodes.php
@@ -187,15 +187,13 @@ class bbcode_shortcodes extends e_shortcode
// Legacy BC Support
-
$data = "size";
$formid = $id."_";
$event = $this->getEvent('expandit',$formid, LANHELP_22);
$text = "var['tagid']}')\" data-function='show' href='#{$this->var['tagid']}' title='".LANHELP_22."' data-bbcode='{$data}'>
";
-
-
+
$text .="
";
$text .="
";
@@ -209,15 +207,75 @@ class bbcode_shortcodes extends e_shortcode
{
$text .= "\n";
}
- $text .="
-
-
- \n
+ $text .="
\n";
return $text;
}
+ function bb_emotes($id)
+ {
+ $pref = e107::getPref();
+
+ if ($pref['comments_emoticons'] && $pref['smiley_activate'] && !defsettrue('e_WYSIWYG'))
+ {
+ if(deftrue('e_BOOTSTRAP'))
+ {
+ $text = '";
+
+ return $text;
+ }
+
+ // Legacy BC version.
+ $text = '';
+ $text .= "
";
+ $text .= '';
+ $text .="
+ \n\n";
+
+ return $text;
+ }
+ }
+
+
+ function renderEmotes()
+ {
+ $emotes = e107::getParser()->getEmotes();
+ $pref = e107::getPref();
+
+ foreach($emotes as $key=>$value)
+ {
+ $key = str_replace("!", ".", $key); // Usually '.' was replaced by '!' when saving
+ $key = preg_replace("#_(\w{3})$#", ".\\1", $key); // '_' followed by exactly 3 chars is file extension
+ $key = e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path
+ $value2 = substr($value, 0, strpos($value, " "));
+ $value = ($value2 ? $value2 : $value);
+ $value = ($value == '&|') ? ':((' : $value;
+ $text .= "\n
";
+
+ }
+
+ return $text;
+ }
+
+
+
function bb_fontcol($id) // JS in this breaks ajax loading.
diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index cf662d175..88b34cc2b 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -538,6 +538,7 @@ class e_parse extends e_parser
*/
function htmlAbuseFilter($data, $tagList = '')
{
+
if ($tagList == '')
{
$checkTags = array('textarea', 'input', 'td', 'tr', 'table');
@@ -587,11 +588,14 @@ class e_parse extends e_parser
/**
+ * XXX TODO Remove this horrible thing which adds junk to a db.
* Checks a string for potentially dangerous HTML tags, including malformed tags
*
*/
public function dataFilter($data, $mode='bbcode')
{
+
+
$ans = '';
$vetWords = array('