# HG changeset patch # User Brian Neal # Date 1240356305 0 # Node ID 03144b0d470d3609be926729ceeac17f297955ab # Parent db40c27545806c0eaf5f37c3fb10224081b13a37 Use jQuery $.trim() in shoutbox.js. diff -r db40c2754580 -r 03144b0d470d media/js/shoutbox.js --- a/media/js/shoutbox.js Sun Apr 19 22:21:34 2009 +0000 +++ b/media/js/shoutbox.js Tue Apr 21 23:25:05 2009 +0000 @@ -2,9 +2,7 @@ var submit = $('#shoutbox-submit'); submit.click(function () { var input = $('#shoutbox-smiley-input'); - var msg = input.val(); - msg = msg.replace(/^\s+/, ''); - msg = msg.replace(/\s+$/, ''); + var msg = $.trim(input.val()); if (msg.length == 0) { return false; }