mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[BUGFIX] 13118 QGIS Server - WFS - GeoJSON and escaping line breaks
Line breaks are not properly handled in GeoJSON results when making GetFeature requests. Line breaks should be replaced by \\n.
This commit is contained in:
parent
b4d206af71
commit
016f497726
@ -1751,7 +1751,10 @@ QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoord
|
||||
else
|
||||
{
|
||||
fStr += "\"";
|
||||
fStr += val.toString().replace( QString( "\"" ), QString( "\\\"" ) );
|
||||
fStr += val.toString()
|
||||
.replace( QString( "\"" ), QString( "\\\"" ) )
|
||||
.replace( QString( "\r" ), QString( "\\r" ) )
|
||||
.replace( QString( "\n" ), QString( "\\n" ) );
|
||||
fStr += "\"";
|
||||
}
|
||||
fStr += "\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user