buttonMarkup: Fixed the trim() issue for IE8 in codes for PR-#6618.