Skip to content

Commit 0a225c4

Browse files
committedJun 22, 2018
Fix escaping of quotes of map layer source in processing
1 parent 17ea4a9 commit 0a225c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/processing/qgsprocessingparameters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3155,7 +3155,7 @@ QString QgsProcessingParameterFeatureSource::valueAsPythonString( const QVariant
31553155
// prefer to use layer source instead of id if possible (since it's persistent)
31563156
if ( QgsVectorLayer *layer = qobject_cast< QgsVectorLayer * >( QgsProcessingUtils::mapLayerFromString( layerString, context ) ) )
31573157
layerString = layer->source();
3158-
return layerString.prepend( '\'' ).append( '\'' );
3158+
return QgsProcessingUtils::stringToPythonLiteral( layerString );
31593159
}
31603160
}
31613161
else

0 commit comments

Comments
 (0)
Please sign in to comment.