Skip to content

Commit

Permalink
Fix escaping of quotes of map layer source in processing
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 22, 2018
1 parent 17ea4a9 commit 0a225c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/processing/qgsprocessingparameters.cpp
Expand Up @@ -3155,7 +3155,7 @@ QString QgsProcessingParameterFeatureSource::valueAsPythonString( const QVariant
// prefer to use layer source instead of id if possible (since it's persistent)
if ( QgsVectorLayer *layer = qobject_cast< QgsVectorLayer * >( QgsProcessingUtils::mapLayerFromString( layerString, context ) ) )
layerString = layer->source();
return layerString.prepend( '\'' ).append( '\'' );
return QgsProcessingUtils::stringToPythonLiteral( layerString );
}
}
else
Expand Down

0 comments on commit 0a225c4

Please sign in to comment.