Skip to content

Commit

Permalink
Change the rendering method for RDF to stop genshi being so 'helpful'
Browse files Browse the repository at this point in the history
If using xhtml as the render method with genshi, and it encounters
xml:lang it will also add a lang attribute with the same value. Helpful.

We change the renderer to be xml if rendering rdf
  • Loading branch information
rossjones committed Jul 25, 2012
1 parent 84a22fe commit a912ef8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/controllers/package.py
Expand Up @@ -309,6 +309,9 @@ def read(self, id, format='html'):
template = self._read_template( package_type )
template = template[:template.index('.')+1] + format

if extension == 'rdf':
return render( template, method="xml", loader_class=loader)

return render( template, loader_class=loader)


Expand Down

0 comments on commit a912ef8

Please sign in to comment.