Bug report #13118

QGIS Server - WFS - GeoJSON and escaping line breaks

Added by Nicolas Boisteault almost 9 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:René-Luc ReLuc
Category:QGIS Server
Affected QGIS version:2.8.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:21183

Description

Line breaks are not properly handled in GeoJSON results when making GetFeature requests.
Line breaks should be replaced by \\\
if I'm correct.

Associated revisions

Revision 81acd07e
Added by René-Luc ReLuc over 8 years ago

Update [BUGFIX] 13118 QGIS Server - WFS - GeoJSON and escaping line breaks

Enhance replace, thanks to @nyalldawson
Enhance format, thanks to @jef-n

fixes #13118

Revision c3572ebc
Added by René-Luc ReLuc over 8 years ago

Update [BUGFIX] 13118 QGIS Server - WFS - GeoJSON and escaping line breaks

Enhance replace, thanks to @nyalldawson
Enhance format, thanks to @jef-n

fixes #13118

Revision 8fb2dc2e
Added by René-Luc ReLuc over 8 years ago

Update [BUGFIX] 13118 QGIS Server - WFS - GeoJSON and escaping line breaks

Enhance replace, thanks to @nyalldawson
Enhance format, thanks to @jef-n

fixes #13118

Revision 5e1d420c
Added by René-Luc ReLuc over 8 years ago

Update [BUGFIX] 13118 QGIS Server - WFS - GeoJSON and escaping line breaks

Enhance replace, thanks to @nyalldawson
Enhance format, thanks to @jef-n

fixes #13118

History

#1 Updated by Giovanni Manghi over 8 years ago

  • Priority changed from High to Normal

#2 Updated by Henrik Uggla over 8 years ago

This GeoJSON document contains linebreaks coded as \
\
which work:
http://www.vakant.nu/gis_json.aspx?mId=1290&type=Mark

If I add that document to a published Qgis Server project and try to access it with wfs using outputformat=GeoJSON, then I get a broken GeoJSON response where \
\
has been substituted with ordinary line breaks.

#3 Updated by Michael Douchin over 8 years ago

  • Target version set to Future Release - High Priority
  • Assignee set to René-Luc ReLuc

#4 Updated by René-Luc ReLuc over 8 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixes by commit 016f497726932ea7380351f1a947265f3b4d114e
backport to 2.12 commit 25db1cc33c65d893db3edecf862dc74f665fd874
backport to 2.8 commit 84971466848d0a7527096c5c2f660465f9183b8f

reopen if needed

Also available in: Atom PDF