ref #4302 Escape '&' in section titles
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / store / StoreUtil.java
index 3f0de0796b57a3a4891152696e4956684016483f..dd3d284a8b4a5905ae215c1c89f90c42c54b6663 100644 (file)
@@ -119,4 +119,18 @@ public class StoreUtil extends AbstractUtility {
                return TaxeditorStorePlugin.PLUGIN_ID;
        }
 
+    /**
+     * Cleans title string for output in section titles<br>
+     * E.g. escapes '&' with "&&" to avoid mnemonic handling (see
+     * Label.setText() documentation)<br>
+     * see also #4302
+     *
+     * @param title
+     *            the title string to clean
+     * @return the cleaned title string
+     */
+       public static String cleanTitleString(String title){
+           return title.replace("&", "&&");
+       }
+
 }