Skip to content

Commit

Permalink
Fix escape of CQL filter
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Nov 15, 2021
1 parent 34b99a2 commit e8d5623
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/api/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function getRegulatoryZoneURL (type, regulatoryZone) {
throw new Error('Le nom de la zone n\'est pas renseigné')
}

const filter = `layer_name='${encodeURIComponent(regulatoryZone.topic)}' AND zones='${encodeURIComponent(regulatoryZone.zone)}'`
const filter = `layer_name='${encodeURIComponent(regulatoryZone.topic).replace(/'/g, '\'\'')}' AND zones='${encodeURIComponent(regulatoryZone.zone).replace(/'/g, '\'\'')}'`
return (
`${GEOSERVER_URL}/geoserver/wfs?service=WFS` +
`&version=1.1.0&request=GetFeature&typename=monitorfish:${type}` +
Expand Down

0 comments on commit e8d5623

Please sign in to comment.