Merge pull request #22671 from civicrm/5.46
[civicrm-core.git] / CRM / PCP / Page / PCPInfo.php
index 38140ba235b12993c2be79b3211648b939607eea..2a3cf3762ee9719f58031f0bc305cefe07268639 100644 (file)
@@ -57,6 +57,7 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page {
 
     CRM_Utils_System::setTitle($pcpInfo['title']);
     $this->assign('pcp', $pcpInfo);
+    $this->assign('currency', $pcpInfo['currency']);
 
     $pcpStatus = CRM_Core_OptionGroup::values("pcp_status");
     $approvedId = CRM_Core_PseudoConstant::getKey('CRM_PCP_BAO_PCP', 'status_id', 'Approved');
@@ -184,10 +185,11 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page {
     if (!empty($entityFile)) {
       $fileInfo = reset($entityFile);
       $fileId = $fileInfo['fileID'];
+      $altText = htmlspecialchars($fileInfo['description'] ?? '');
       $fileHash = CRM_Core_BAO_File::generateFileHash($this->_id, $fileId);
       $image = '<img src="' . CRM_Utils_System::url('civicrm/file',
           "reset=1&id=$fileId&eid={$this->_id}&fcs={$fileHash}"
-        ) . '" />';
+        ) . '" alt="' . $altText . '"/>';
       $this->assign('image', $image);
     }