public static String getDisplayNameWithRef(TaxonBase taxonBase) {
TaxonNameBase name = (TaxonNameBase) HibernateProxyHelper.deproxy(taxonBase.getName());
if (name != null) {
- return name.generateFullTitle();
+ String fullTitle = name.generateFullTitle();
+ if (fullTitle != null){ //should never be null
+ fullTitle = fullTitle.replaceAll("(\\r|\\n|\\r\\n)", ""); //replaces LineBreaks, maybe we should include U+000C, U+0085, U+2028, U+2029 which are also linebreaks according to UNICODE stardard.
+ }
+ return fullTitle;
}
return "";
}