geopython / pywps

PyWPS is an implementation of the Web Processing Service standard from the Open Geospatial Consortium. PyWPS is written in Python.
https://pywps.org
MIT License
178 stars 117 forks source link

Escape XML responses #628

Open matprov opened 3 years ago

matprov commented 3 years ago

Description

XML responses should be escaped, in order to expose valid XML.

For example, in a service that uses pywps package, we currently get this response when querying ?request=GetCapabilities&service=WPS:

...
    <ows:Title>Maximum number of consecutive frost days (Tn < 0).</ows:Title>
...

To be valid, the response should be:

...
    <ows:Title>Maximum number of consecutive frost days (Tn &lt; 0).</ows:Title>
...
cehbrecht commented 3 years ago

I have added an example process to Emu with characters that should be encoded: https://github.com/bird-house/emu/pull/115

The encoding of < and > is working in my local test with pywps 4.4.5.