ref #6318 Remove LF and CR from description text
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / descriptive / DescriptiveLabelProvider.java
index 5d7dcee6abb6e39d3783df6dcef9591773736026..34efde70b7703295dbd5447268f81049521cd297 100644 (file)
@@ -20,12 +20,13 @@ import eu.etaxonomy.taxeditor.model.DescriptionHelper;
  */
 public class DescriptiveLabelProvider extends ColumnLabelProvider implements IStyledLabelProvider  {
 
-    private static final String TRUNCATE_SIGN = "...";
+    private static final String TRUNCATE_SIGN = "..."; //$NON-NLS-1$
     private static final int MAX_LENGTH = 60;
 
        @Override
     public String getText(Object element) {
                String text = DescriptionHelper.getLabel(element);
+               text = text.replaceAll("[\\r\\n]", ""); //$NON-NLS-1$ //$NON-NLS-2$
                if(text.length()>MAX_LENGTH){
                    text = text.substring(0, MAX_LENGTH)+TRUNCATE_SIGN;
                }