Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

html markup in textarea can cause size to be way off


Project:Auto Growing Textareas
Version:1.2.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If you have html markup in the textarea - it gets rendered into the dummy div as is, so for example if you have image tags in your text it could potentially render the image in the dummy div causing your textarea to be much bigger than it should be. Simple fix is to escape all html tags. Around line 101 change to:

var html = this.textarea.val().replace(/</g, '&lt;');
var html = html.replace(/>/g, '&gt;');
var html = html.replace(/\n/g, '<br>new');