Escape custom group title.
authoreileen <emcnaughton@wikimedia.org>
Thu, 22 Mar 2018 00:19:08 +0000 (13:19 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 22 Mar 2018 00:19:08 +0000 (13:19 +1300)
If the custom group title has an appostrophe then the js will break without this

templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl

index fa46b57d3fb28087ae17b8a71ae8c74fd0674d02..03206d0b8995974c4ec6831ec48639a93e39fdb8 100644 (file)
@@ -49,7 +49,7 @@
               {literal}
               <script type="text/javascript">
                 (function($) {
-                  var ZeroRecordText = {/literal}'{ts 1=$customGroupTitle}No records of type \'%1\' found.{/ts}'{literal};
+                  var ZeroRecordText = {/literal}'{ts 1=$customGroupTitle|escape}No records of type \'%1\' found.{/ts}'{literal};
                   var $table = $('#records-' + {/literal}'{$customGroupId}'{literal});
                   $('table.crm-multifield-selector').data({
                     "ajax": {