diff --git a/jquery.restable.js b/jquery.restable.js
index fe64b82..c523f90 100755
--- a/jquery.restable.js
+++ b/jquery.restable.js
@@ -41,7 +41,11 @@
if (s.rowHeaders) {
if (!$result[value]) { $result[value] = {}; }
- $result[value][$row.children('td:nth-child(1)').text()] = $row.children('td:nth-child(' + (index + 1) + ')').text();
+ if(s.keepHtml) {
+ $result[value][$row.children('td:nth-child(1)').html()] = $row.children('td:nth-child(' + (index + 1) + ')').html();
+ } else {
+ $result[value][$row.children('td:nth-child(1)').text()] = $row.children('td:nth-child(' + (index + 1) + ')').text();
+ }
} else {
if (!$result[$row_number]) { $result[$row_number] = {}; }
if (s.keepHtml){
diff --git a/jquery.restable.min.js b/jquery.restable.min.js
index 8e1e79a..a991c31 100755
--- a/jquery.restable.min.js
+++ b/jquery.restable.min.js
@@ -4,4 +4,4 @@
* @link http://codeb.it/restable/
* @license MIT
*/
-!function(t,e,n){"use strict";t.fn.ReStable=function(i){function a(e,n){var i,a=[],h={},c=t(e).find("tr").first().children("td,th"),l=0;return s.rowHeaders&&(c=c.slice(1)),c.each(function(){a.push(t(this).text())}),t(e).find("tr").slice(1).each(function(){var e=t(this);l+=1,t.each(a,function(t,n){t+=1,s.rowHeaders?(h[n]||(h[n]={}),h[n][e.children("td:nth-child(1)").text()]=e.children("td:nth-child("+(t+1)+")").text()):(h[l]||(h[l]={}),h[l][n]=s.keepHtml?e.children("td:nth-child("+t+")").html():e.children("td:nth-child("+t+")").text())})}),i=t("
",{"class":"tabletolist "+(s.rowHeaders?"rh":"nrh"),id:"tabletolist"+n}).insertBefore(t(e)),t.each(h,function(e,n){var a=t("",{html:s.rowHeaders?''+e+"":""}).appendTo(i),h=t("").appendTo(a);t.each(n,function(e,n){t("",{"class":"cf",html:' '+n+""}).appendTo(h)})}),i}var s=t.extend({rowHeaders:!0,maxWidth:480,keepHtml:!1},i);this.each(function(){function i(){t(e).width()>parseInt(s.maxWidth,10)?(t(c).show(),h&&t(h).hide()):(t(c).hide(),h?t(h).show():h=a(c,n))}var h,c=t(this);n+=1,i(),t(e).resize(function(){i()})})},t.ReStable=function(e){t("table").ReStable(e)}}(jQuery,this,0);
\ No newline at end of file
+!function(t,e,n){"use strict";t.fn.ReStable=function(i){function h(e,n){var i,h=[],a={},s=t(e).find("tr").first().children("td,th"),c=0;return l.rowHeaders&&(s=s.slice(1)),s.each(function(){h.push(t(this).text())}),t(e).find("tr").slice(1).each(function(){var e=t(this);c+=1,t.each(h,function(t,n){t+=1,l.rowHeaders?(a[n]||(a[n]={}),l.keepHtml?a[n][e.children("td:nth-child(1)").html()]=e.children("td:nth-child("+(t+1)+")").html():a[n][e.children("td:nth-child(1)").text()]=e.children("td:nth-child("+(t+1)+")").text()):(a[c]||(a[c]={}),a[c][n]=l.keepHtml?e.children("td:nth-child("+t+")").html():e.children("td:nth-child("+t+")").text())})}),i=t("",{"class":"tabletolist "+(l.rowHeaders?"rh":"nrh"),id:"tabletolist"+n}).insertBefore(t(e)),t.each(a,function(e,n){var h=t("",{html:l.rowHeaders?''+e+"":""}).appendTo(i),a=t("").appendTo(h);t.each(n,function(e,n){t("",{"class":"cf",html:' '+n+""}).appendTo(a)})}),i}var l=t.extend({rowHeaders:!0,maxWidth:480,keepHtml:!1},i);this.each(function(){function i(){t(e).width()>parseInt(l.maxWidth,10)?(t(s).show(),a&&t(a).hide()):(t(s).hide(),a?t(a).show():a=h(s,n))}var a,s=t(this);n+=1,i(),t(e).resize(function(){i()})})},t.ReStable=function(e){t("table").ReStable(e)}}(jQuery,this,0);
\ No newline at end of file