--- trunk/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm 2003/07/11 20:01:56 1364 +++ trunk/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm 2003/07/14 15:14:14 1378 @@ -768,7 +768,9 @@ } sub nbsp { my $str = shift; - ($str eq '') ? ' ' : $str ; # returns non-breaking space for empty strings + ($str =~/\S/) ? $str : ' ' ; # returns non-breaking space for empty strings + # tricky cases: $str =0; + # $str is a complex number } sub viewOptions($) { my $self = shift;