X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FContact.php;h=468c3f2c31c74dd97b222ed0a6eb254d2178df97;hb=309462c14f316ede57c8a7cfd107dd7f6bcc44ba;hp=b4105510dd62cb74a1d602a2dc9a8286d6b2293e;hpb=6e1a96bec4660bb24e8f6f8202a04ef5139fda8b;p=civicrm-core.git diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index b4105510dd..468c3f2c31 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -749,14 +749,13 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { } if ($this->_action == CRM_Core_Action::UPDATE) { - $deleteExtra = ts('Are you sure you want to delete contact image.'); + $deleteExtra = json_encode(ts('Are you sure you want to delete contact image.')); $deleteURL = array( CRM_Core_Action::DELETE => array( 'name' => ts('Delete Contact Image'), 'url' => 'civicrm/contact/image', 'qs' => 'reset=1&cid=%%id%%&action=delete', - 'extra' => - 'onclick = "if (confirm( \'' . $deleteExtra . '\' ) ) this.href+=\'&confirmed=1\'; else return false;"', + 'extra' => 'onclick = "' . htmlspecialchars("if (confirm($deleteExtra)) this.href+='&confirmed=1'; else return false;") . '"', ), ); $deleteURL = CRM_Core_Action::formLink($deleteURL, @@ -946,7 +945,6 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { $customFieldExtends = (CRM_Utils_Array::value('contact_sub_type', $params)) ? $params['contact_sub_type'] : $params['contact_type']; $params['custom'] = CRM_Core_BAO_CustomField::postProcess($params, - $customFields, $this->_contactId, $customFieldExtends, TRUE @@ -1235,7 +1233,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { * of key value consist of address blocks. * * @return array - * as array of sucess/fails for each address block + * as array of success/fails for each address block */ public function parseAddress(&$params) { $parseSuccess = $parsedFields = array();