Skip to content

Commit

Permalink
safeguard JSON links in ISO mode (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis authored Sep 16, 2023
1 parent 1edf39e commit 522c5f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pycsw/plugins/profiles/apiso/apiso.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,13 +688,13 @@ def write_record(self, result, esn, outputschema, queryables, caps=None):
etree.SubElement(linkage, util.nspath_eval('gmd:URL', self.namespaces)).text = link['url']

protocol = etree.SubElement(online2, util.nspath_eval('gmd:protocol', self.namespaces))
etree.SubElement(protocol, util.nspath_eval('gco:CharacterString', self.namespaces)).text = link['protocol']
etree.SubElement(protocol, util.nspath_eval('gco:CharacterString', self.namespaces)).text = link.get('protocol', 'WWW:LINK')

name = etree.SubElement(online2, util.nspath_eval('gmd:name', self.namespaces))
etree.SubElement(name, util.nspath_eval('gco:CharacterString', self.namespaces)).text = link['name']
etree.SubElement(name, util.nspath_eval('gco:CharacterString', self.namespaces)).text = link.get('name')

desc = etree.SubElement(online2, util.nspath_eval('gmd:description', self.namespaces))
etree.SubElement(desc, util.nspath_eval('gco:CharacterString', self.namespaces)).text = link['description']
etree.SubElement(desc, util.nspath_eval('gco:CharacterString', self.namespaces)).text = link.get('description')

return node

Expand Down

0 comments on commit 522c5f8

Please sign in to comment.