String title = "";
if (getEntity() != null && (getEntity() instanceof IdentifiableEntity) && !(getEntity() instanceof SpecimenOrObservationBase)) {
title = ": " + ((IdentifiableEntity) getEntity()).getTitleCache();
+ // we have to duplicate ampersands otherwise they are treated as
+ // mnenomic (see Label.setText() documentation)
+ // see also #4302
+ title = title.replace("&", "&&");
}
this.setText(String.format("%s%s", getHeading(), title));
setTextClient(createToolbar());