I've got the following macro button defined to wrap a selection in a shortcode in the wp_editor visual editor:
(function() {
tinymce.create('tinymce.plugins.ingredient_name', {
init : function(ed, url){
ed.addButton('ingredient_name', {
title : 'Tag ingredient',
onclick : function() {
var text=ed.selection.getContent({'format':'text'});
ed.execCommand('mceInsertContent',false,'[ingredient_name]' + text + '[/ingredient_name]');
},
image: url + "/name.png"
});
}
});
tinymce.PluginManager.add('ingredient_name', tinymce.plugins.ingredient_name);
})();
The macro works as intended, except that tinymce is also inserting   in front of the resulting shortcode. So, instead of this result:
1 [ingredient_name]pound[/ingredient_name] salami
I get this:
1 [ingredient_name]pound[/ingredient_name] salami
this then somehow gets mangled when inserting to the DB, and rendered to the template, I get '1Â pound salami'. I can go back and remove the offending  's, but I'd prefer tinyMCE not insert that entity in the first place. Any ideas?