Skip to content

Commit fdecdf9

Browse files
author
wonder
committed
Fixed #2766.
git-svn-id: http://svn.osgeo.org/qgis/trunk@13755 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e48766e commit fdecdf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/qgssearchquerybuilder.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ void QgsSearchQueryBuilder::getFieldValues( int limit )
151151

152152
if ( !numeric )
153153
{
154-
// put string in single quotes
155-
value = "'" + value + "'";
154+
// put string in single quotes and escape single quotes in the string
155+
value = "'" + value.replace( "'", "''" ) + "'";
156156
}
157157

158158
// add item only if it's not there already

0 commit comments

Comments
 (0)