Skip to content

Commit

Permalink
fixed a problem when script tags are inserted into text area
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Swedberg committed Aug 25, 2009
1 parent 97cfc7b commit 243aaca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.expandable.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $.fn.extend({

function check() {
var text = $this.val(), newHeight, height, usedHeight, usedRows, availableRows;
$div.html( text.replace(/\n/g, '&nbsp;<br>') );
$div.html( text.replace(/\n/g, '&nbsp;<br>').replace(/<(\/?)scrip/g,'<$1scirp') );
height = $this[0].offsetHeight - heightDiff;
usedHeight = $div[0].offsetHeight - heightDiff;
usedRows = Math.floor(usedHeight / rowSize);
Expand Down

0 comments on commit 243aaca

Please sign in to comment.