Project

General

Profile

« Previous | Next » 

Revision 49525

Escaping ' which seems not to be automatically escaped as expected

View differences:

modules/dnet-parthenos-publisher/trunk/src/main/java/eu/dnetlib/parthenos/registry/FacetWriter.java
194 194

  
195 195
	protected String getDescriptionFromRDFResource(final Resource resource) {
196 196
		if (resource.hasProperty(CRM.P3_has_note)) {
197
			return resource.getProperty(CRM.P3_has_note).getString();
197
			return resource.getProperty(CRM.P3_has_note).getString().replace("'", "\'");
198 198
		} else return "";
199 199
	}
200 200

  
201 201
	protected String getLabelFromRDFResource(final Resource resource) {
202 202
		if (resource.hasProperty(RDFS.label)) {
203
			return resource.getProperty(RDFS.label).getString();
203
			return resource.getProperty(RDFS.label).getString().replace("'", "\'");
204 204
		} else return "";
205 205
	}
206 206

  
......
211 211
			if (compRes.hasProperty(RDFS.label))
212 212
				comp = compRes.getProperty(RDFS.label).getString();
213 213
		}
214
		return comp;
214
		return comp.replace("'", "\'");
215 215
	}
216 216

  
217 217
	protected String getAvailabilityFromRDFResource(final Resource resource) {

Also available in: Unified diff