tested with elgg v1.12.14 + widget manager v5.2. I had a look into widget manager latest version v7.0.1 and widget_pack v1.0 and I think this issue will be reproduce with the latest versions.
<?php
$widget = $vars["entity"];
$height = sanitise_int($widget->height, false);
$data_widget_id = sanitise_string($widget->data_widget_id);
$href = sanitise_string($widget->href);
if (!empty($data_widget_id) || !empty($href)) {
if ($height) {
$height = "data-height='" . $height . "'";
}
if ($data_widget_id) {
$data_widget_id = "data-widget-id='" . $data_widget_id . "'";
}
if ($href) {
$href = "href='" . $href . "'";
}
?>
<a class="twitter-timeline" data-dnt="true" <?php echo $data_widget_id; ?> <?php echo $href; ?> <?php echo $height; ?> ></a>
and widget_manager_widgets_twitter_search_settings_save_hook() in lib/widgets.php
$pattern = '/data-widget-id=\"(\d+)\"/i';
$matches = array();
if (preg_match($pattern, $embed_code, $matches)) {
$widget->data_widget_id = $matches[1];
$widget->href = "";
} else {
$pattern = '/href=["\']?([^"\'>]+)["\']?/i';
$matches = array();
if (preg_match($pattern, $embed_code, $matches)) {
$widget->href = $matches[1];
$widget->data_widget_id = "";
} else {
register_error(elgg_echo("widgets:twitter_search:embed_code:error"));
return;
}
}
}