From 5fbaca75b443f05d574e68bfaf98801e8a291e80 Mon Sep 17 00:00:00 2001 From: Allen Boone Date: Mon, 8 Jun 2015 15:35:23 -0400 Subject: [PATCH] Fixed sidebar id issue --- editor/js/ui/sidebar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/js/ui/sidebar.js b/editor/js/ui/sidebar.js index 6e94a8ab0..e6f93a5f7 100644 --- a/editor/js/ui/sidebar.js +++ b/editor/js/ui/sidebar.js @@ -30,7 +30,8 @@ RED.sidebar = (function() { function addTab(title,content,closeable) { $("#sidebar-content").append(content); $(content).hide(); - sidebar_tabs.addTab({id:"tab-"+title,label:title,closeable:closeable}); + var id = content.id || "tab-"+title.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, "\\$1" ); + sidebar_tabs.addTab({id:id,label:title,closeable:closeable}); //content.style.position = "absolute"; //$('#sidebar').tabs("refresh"); }