Project

General

Profile

Revision c9431ec7

IDc9431ec7743817a965b6a5f73896073aba76046a
Parent f7ad5209
Child b5c51bc0, 503a90d0

Added by Andreas Müller over 7 years ago

fix linebreak problem for imported names #3798

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/NameHelper.java
52 52
	public static String getDisplayNameWithRef(TaxonBase taxonBase) {
53 53
		TaxonNameBase name = (TaxonNameBase) HibernateProxyHelper.deproxy(taxonBase.getName());
54 54
		if (name != null) {
55
			return name.generateFullTitle();
55
			String fullTitle = name.generateFullTitle();
56
			if (fullTitle != null){  //should never be null
57
				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.
58
			}
59
			return fullTitle;
56 60
		}
57 61
		return "";
58 62
	}	

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)