adamwulf/Columnizer-jQuery-Plugin — Issue #30: Double or leading spaces in text split locations
Author: chrisgraham
Created: 2012-01-20 02:20:54+00:00
State: open

It'll get in an infinite loop if it's splitting at the top level (i.e. in columnize) with some text node that includes double spaces. This is because it assumes each space is a delimiter of text blocks of length greater than 1.

The while loop in columnize needs changing to:
```
while($parentColumn.height() < height && oText.length){
var pos = oText.indexOf(' ', counter2);
if (pos == 0) pos = oText.substring(1).indexOf(' ', counter2)+1;
if (pos != -1) {
columnText = oText.substring(0, pos);
} else {
columnText = oText;
}
latestTextNode = document.createTextNode(columnText);
$putInHere.append(latestTextNode);

if((oText.length > counter2) && (pos)) {
oText = oText.substring(pos);
}else{
oText = "";
}
}
```