ensure IndexPlugin works with non-blank page references
package org.apache.wiki.plugin;
+import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.wiki.api.core.Context;
import org.apache.wiki.api.core.ContextEnum;
@@ -78,7 +79,7 @@ public class IndexPlugin extends AbstractReferralPlugin implements Plugin {
char initialChar = ' ';
Element currentDiv = new Element("div",xmlns_XHTML);
for( final String name : pages ) {
- if ( name.charAt(0) != initialChar ) {
+ if( StringUtils.isNotBlank( name ) && name.charAt(0) != initialChar ) {
if ( initialChar != ' ' ) {
indexDiv.addContent(" - ");
}
