- {
-
-// Too complex in HTML5 to mix <br> with word wrapping.
-//
-// String[] htmllines = ttext.split("<br>");
-// for (String line : htmllines)
-// {
-// maxLengthExceeded = line.length() > 60;
-// if (maxLengthExceeded)
-// {
-// break;
-// }
-// }
+ {
+ int pt = -1, ptlast = -4;
+ while ((pt = ttext.indexOf("<br>", pt + 1)) >= 0) {
+ if (pt - ptlast - 4 > 60) {
+ maxLengthExceeded = true;
+ break;
+ }
+ }