Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update [BUGFIX] 13118 QGIS Server - WFS - GeoJSON and escaping line b…
…reaks

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

fixes #13118
  • Loading branch information
rldhont committed Nov 12, 2015
1 parent ff67a05 commit 5e1d420
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/qgswfsserver.cpp
Expand Up @@ -1752,9 +1752,9 @@ QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoord
{
fStr += "\"";
fStr += val.toString()
.replace( QString( "\"" ), QString( "\\\"" ) )
.replace( QString( "\r" ), QString( "\\r" ) )
.replace( QString( "\n" ), QString( "\\n" ) );
.replace( '"', "\\\"" )
.replace( '\r', "\\r" )
.replace( '\n', "\\n" );
fStr += "\"";
}
fStr += "\n";
Expand Down

0 comments on commit 5e1d420

Please sign in to comment.