Skip to content

Commit

Permalink
Fix for ticket #953.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9014 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gjm committed Aug 7, 2008
1 parent 864fd7a commit bfcbf26
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/qgsattributeaction.cpp
Expand Up @@ -105,8 +105,12 @@ QString QgsAttributeAction::expandAction(QString action, const std::vector<std::

for (unsigned int i = 0; i < values.size(); ++i)
{
QString to_replace = "%" + values[i].first;
expanded_action = expanded_action.replace(to_replace, values[i].second);
// Check for a replace a quoted version and a non-quoted version.
QString to_replace_1 = "[%" + values[i].first + "]";
QString to_replace_2 = "%" + values[i].first;

expanded_action = expanded_action.replace(to_replace_1, values[i].second);
expanded_action = expanded_action.replace(to_replace_2, values[i].second);
}

return expanded_action;
Expand Down

0 comments on commit bfcbf26

Please sign in to comment.