Skip to content

Commit 5e1d420

Browse files
committed
Update [BUGFIX] 13118 QGIS Server - WFS - GeoJSON and escaping line breaks
Enhance replace, thanks to @nyalldawson Enhance format, thanks to @jef-n fixes #13118
1 parent ff67a05 commit 5e1d420

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/server/qgswfsserver.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1752,9 +1752,9 @@ QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoord
17521752
{
17531753
fStr += "\"";
17541754
fStr += val.toString()
1755-
.replace( QString( "\"" ), QString( "\\\"" ) )
1756-
.replace( QString( "\r" ), QString( "\\r" ) )
1757-
.replace( QString( "\n" ), QString( "\\n" ) );
1755+
.replace( '"', "\\\"" )
1756+
.replace( '\r', "\\r" )
1757+
.replace( '\n', "\\n" );
17581758
fStr += "\"";
17591759
}
17601760
fStr += "\n";

0 commit comments

Comments
 (0)