From: Mike Hollis Date: Mon, 25 Jun 2012 13:52:42 +0000 (-0400) Subject: Button: Trim button text before setting as title attribute. X-Git-Tag: 1.9.0-beta.1~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=535ef2a01c27857cf9e11c86beea97890266e018;p=jquery-ui.git Button: Trim button text before setting as title attribute. --- diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 0c72e9c4b..89f6626f8 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -344,7 +344,7 @@ $.widget( "ui.button", { buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); if ( !this.hasTitle ) { - buttonElement.attr( "title", buttonText ); + buttonElement.attr( "title", $.trim( buttonText ) ); } } } else {