3-Round-Stones / callimachus

Callimachus is a highly scalable platform for creating and running data-driven websites
Other
96 stars 24 forks source link

Fix ampersand encoding on rdfxml view #211

Closed edwardsph closed 9 years ago

edwardsph commented 9 years ago

When you click the RDF/XML link on a describe page it renders the XML into a <pre> element in a new page. If the RDF included encoded characters in the data such as & and < these are resolved for display in the <pre> element meaning that the XML is no longer valid. For example you get:

<page xmlns="http://xmlns.com/foaf/0.1/" rdf:resource="http://iaspub.epa.gov/sor_internet/registry/substreg/searchandretrieve/advancedsearch/search.do?details=displayDetails&selectedSubstanceId=48273”/>
<literalForm xmlns="http://www.w3.org/2008/05/skos-xl#">Naphthalene, contains (flammable liquids, toxic <or> poisonous, n.o.s.)</literalForm>

This fix double encodes the ampersands to avoid this.