Skip to content

Commit 36cda7d

Browse files
author
gjm
committed
Fix for ticket #953.
git-svn-id: http://svn.osgeo.org/qgis/trunk@9014 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e834c0a commit 36cda7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/qgsattributeaction.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ QString QgsAttributeAction::expandAction(QString action, const std::vector<std::
105105

106106
for (unsigned int i = 0; i < values.size(); ++i)
107107
{
108-
QString to_replace = "%" + values[i].first;
109-
expanded_action = expanded_action.replace(to_replace, values[i].second);
108+
// Check for a replace a quoted version and a non-quoted version.
109+
QString to_replace_1 = "[%" + values[i].first + "]";
110+
QString to_replace_2 = "%" + values[i].first;
111+
112+
expanded_action = expanded_action.replace(to_replace_1, values[i].second);
113+
expanded_action = expanded_action.replace(to_replace_2, values[i].second);
110114
}
111115

112116
return expanded_action;

0 commit comments

Comments
 (0)