Skip to content

Commit

Permalink
bugfix: escape html special chars in <td> (issue handsontable#19, tha…
Browse files Browse the repository at this point in the history
…nks @kimwz)
  • Loading branch information
warpech committed Jun 15, 2012
1 parent db7a0fb commit 6c198ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.handsontable.js
Expand Up @@ -1740,7 +1740,7 @@
default:
value = '';
}
td.innerHTML = value.replace(/\n/g, '<br/>');
td.innerHTML = value.replace(/\n/g, '<br/>').replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;"); //escape html special chars
datamap.set(row, col, value);
grid.updateLegend({row: row, col: col});
return td;
Expand Down

0 comments on commit 6c198ca

Please sign in to comment.