I’m having lots of problems with a really poor-developed themeforest WP theme, Dignity.
In particular, I have a short code that renders a custom text rotator. Code is pretty straightforward, something like:
[text-rotator customclass="mycssclass"]my text, my text<br />new text[/text-rotator]
The very odd thing is that when the short code is displayed, every HTML tag is removed. They are directly removed, and the content is not touched. For example, for the code above, I will get in output my text, mytextnewtext; without the line break.
How come? Perhaps is a built-in WP filter? I checked through the short code function, but there seems not to be any filter. Here’s where the short code is registered:
function dignity_text_rotator($atts, $content = null)
{
extract(shortcode_atts(array("customclass" => '', "fx" => ''), $atts));
//Options
$data_fx = '';
if($fx != '')
{
$data_fx = 'data-fx="'.$fx.'"';
$customclass = $customclass.' animated';
}
if($customclass != '') { $cc = $customclass; } else $cc = '';
//Return content
$html = '<div class="text-rotator '.$cc.'" '.$data_fx.'><span class="rotate">'.do_shortcode($content).'</span></div>';
return $html;
}
Any hint?
Updated: oddly, the problem was in the js script that then reads the text inside the div and creates the actual text-rotator.
In fact, it sanitizes all the html when reading node html by directly removing the HTML tags. To solve this, I had to modify the way the note content is retrieved in the JS script.