diff --git a/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php b/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php index b5c6c30..21372ce 100644 --- a/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php +++ b/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php @@ -228,7 +228,7 @@ class CRM_ConstituentsOnly_BAO_ConstituentsOnly { "'{$cid}'", "'{$cid}'", "'{$prevCacheKey}'", - "'" . $newRows[$cid]['sort_name'] . "')", + "'" . CRM_Core_DAO::escapeString($newRows[$cid]['sort_name']) . "')", ]; CRM_Core_BAO_PrevNextCache::setItem($prevCache); }