This subroutine can be called just like sub T, the resulting string will not be split accross lines by the browser. I suggest inserting it near to the T subroutine.
sub Nonbreak { # BH028 my ($text) = @_; # BH028 $text =~ s/ / /g; # BH028 replace all spaces with non-breaking space return $text; # BH028 } # BH028
$result .= ' ' . Nonbreak(T("You are<strong> $UserData{'username'} </strong>Id# $UserID")); # BH028
I have found this useful as a reminder that my user preferences are set correctly. I position it somewhere towards the right hand side of the page. By ensuring a non-breaking string, the phrase is treated as un-breakable and will jump down a line as one unit if the window is reduced in width. --BrianHunter