diff --git a/cms/templates/widgets/tabs-aggregator.html b/cms/templates/widgets/tabs-aggregator.html
index 02c34d4dc1..14a9e7b4cc 100644
--- a/cms/templates/widgets/tabs-aggregator.html
+++ b/cms/templates/widgets/tabs-aggregator.html
@@ -5,7 +5,7 @@
diff --git a/common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.coffee b/common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.coffee
index 10084d2a19..e64d0ca840 100644
--- a/common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.coffee
+++ b/common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.coffee
@@ -32,7 +32,7 @@ class @TabsEditingDescriptor
@$tabs.each( (index, value) ->
if $(value).hasClass('current')
- previousTab = $(value).html()
+ previousTab = $(value).data('tab_name')
)
# init and save data from previous tab
@@ -42,7 +42,7 @@ class @TabsEditingDescriptor
# (to be implemented when there is a use case for this functionality)
# call onswitch
- onSwitchFunction = TabsEditingDescriptor.Model.modules[@html_id].tabSwitch[$currentTarget.text()]
+ onSwitchFunction = TabsEditingDescriptor.Model.modules[@html_id].tabSwitch[$currentTarget.data('tab_name')]
onSwitchFunction() if $.isFunction(onSwitchFunction)
@$tabs.removeClass('current')
@@ -59,7 +59,7 @@ class @TabsEditingDescriptor
save: ->
@element.off('click', '.editor-tabs .tab', @onSwitchEditor)
- current_tab = @$tabs.filter('.current').html()
+ current_tab = @$tabs.filter('.current').data('tab_name')
data: TabsEditingDescriptor.Model.getValue(@html_id, current_tab)
setMetadataEditor : (metadataEditor) ->