escape to commas and periods
removed escaping of single quotes
merge of rdfapi with upstream