Skip to content

Commit 8fb2dc2

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 ff20c88 commit 8fb2dc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/server/qgswfsserver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,9 +1743,9 @@ QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoord
17431743
{
17441744
fStr += "\"";
17451745
fStr += val.toString()
1746-
.replace( QString( "\"" ), QString( "\\\"" ) )
1747-
.replace( QString( "\r" ), QString( "\\r" ) )
1748-
.replace( QString( "\n" ), QString( "\\n" ) );
1746+
.replace( '"', "\\\"" )
1747+
.replace( '\r', "\\r" )
1748+
.replace( '\n', "\\n" );
17491749
fStr += "\"";
17501750
}
17511751
fStr += "\n";

0 commit comments

Comments
 (0)