Fix double encoding of document title on Contact view form
authorRich Lott / Artful Robot <forums@artfulrobot.uk>
Fri, 11 Mar 2022 09:30:40 +0000 (09:30 +0000)
committerRich Lott / Artful Robot <forums@artfulrobot.uk>
Fri, 11 Mar 2022 09:30:40 +0000 (09:30 +0000)
templates/CRM/Contact/Page/View/Summary.js

index 1d57d9992ccee5e955bd5c1089ea3d17dc5f965d..71c5ca47c5183763cef71db2afb7269c12a1c193 100644 (file)
     function refreshTitle() {
       var contactName = $('.crm-summary-display_name').text();
       contactName = $.trim(contactName);
-      document.title = $('title').html().replace(oldName, contactName);
+      document.title = document.title.replace(oldName, contactName);
       oldName = contactName;
     }
     $('#contactname-block').on('load', refreshTitle);