Job Title with Ampersand gets duplicated.

Hello,

I am having an interesting issue with the out of the box core results web part when displaying people results whose title contains an ampersand. Snapshot attached. The first instance of the ampersand appears a bit strange so I am not sure if it is an character encoding issue. I have also put a breakpoint in item_person.js and it appears that search is returning the duplicate title. The infrastructure is running the March PU.

May 13th, 2013 9:06pm

We are experiencing the same exact issue. I saw a post in the SharePoint 2010 forums that said this problem was fixed with a CU, but that was for SharePoint 2010.

Here is the thread I was referencing

User titles containing "&" are double after upgrade to March CU

  • Edited by Brandon S Sunday, December 15, 2013 11:57 PM Additional Info
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2013 9:57pm

We are experiencing the same exact issue. I saw a post in the SharePoint 2010 forums that said this problem was fixed with a CU, but that was for SharePoint 2010.

Here is the thread I was referencing

User titles containing "&" are double after upgrade to March CU

  • Edited by Brandon S Sunday, December 15, 2013 11:57 PM Additional Info
December 15th, 2013 9:57pm

We too were having this issue. I have the User Profile Service Application configured to sync with Active Directory. We have "physicalDeliveryOfficeName" mapped to the "Office" field on the user profile.

I was able to workaround this issue by altering a copy of the Item_Person display template \\<web app uri>\_catalogs\masterpage\Display Templates\Search\.

I added the following line to the JavaScript at the job title section.

$parsedTitle = displayJtitle.split("\n")

Then overwrote the corresponding DIV like this:

<div id="JobTitleValue" class="ms-srch-ellipsis" title="', encodedJtitle ,'"> ', $parsedTitle[0] ,' </div>'

Hope this helps.

  • Proposed as answer by Cory Syvenky Wednesday, February 05, 2014 10:16 PM
  • Marked as answer by Lambros Vasiliou Friday, February 07, 2014 1:41 PM
Free Windows Admin Tool Kit Click here and download it now
February 5th, 2014 10:09pm

We too were having this issue. I have the User Profile Service Application configured to sync with Active Directory. We have "physicalDeliveryOfficeName" mapped to the "Office" field on the user profile.

I was able to workaround this issue by altering a copy of the Item_Person display template \\<web app uri>\_catalogs\masterpage\Display Templates\Search\.

I added the following line to the JavaScript at the job title section.

$parsedTitle = displayJtitle.split("\n")

Then overwrote the corresponding DIV like this:

<div id="JobTitleValue" class="ms-srch-ellipsis" title="', encodedJtitle ,'"> ', $parsedTitle[0] ,' </div>'

Hope this helps.

  • Proposed as answer by Cory Syvenky Wednesday, February 05, 2014 10:16 PM
  • Marked as answer by Lambros Vasiliou Friday, February 07, 2014 1:41 PM
February 5th, 2014 10:09pm

We too were having this issue. I have the User Profile Service Application configured to sync with Active Directory. We have "physicalDeliveryOfficeName" mapped to the "Office" field on the user profile.

I was able to workaround this issue by altering a copy of the Item_Person display template \\<web app uri>\_catalogs\masterpage\Display Templates\Search\.

I added the following line to the JavaScript at the job title section.

$parsedTitle = displayJtitle.split("\n")

Then overwrote the corresponding DIV like this:

<div id="JobTitleValue" class="ms-srch-ellipsis" title="', encodedJtitle ,'"> ', $parsedTitle[0] ,' </div>'

Hope this helps.


Fantastic although I was hoping for a fix from Microsoft :)
Free Windows Admin Tool Kit Click here and download it now
February 7th, 2014 1:42pm

I encountered this same issue.

Upon closer inspection of the SP User Profile (https://www.spsite.com/[SitecollectionName]/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v=%27[domain]\[EmpID]%27) we found the job title appeared in three XML elements:

...
<d:Title>Boss &amp; Mgr</d:Title>
...
<d:UserProfileProperties>
   <d:element m:type="SP.KeyValue">
      <d:Key>Title</d:Key>
      <d:Value>Boss &amp; Mgr</d:Value>
      <d:ValueType>Edm.String</d:ValueType>
   </d:element>
   <d:element m:type="SP.KeyValue">
      <d:Key>SPS-JobTitle</d:Key>
      <d:Value>Boss  Mgr</d:Value>
      <d:ValueType>Edm.String</d:ValueType>
   </d:element>
...

That difference in ampersands is because the first few are standard HTML encoded while the last one one is a Unicode Fullwidth Ampersand. I'm guessing Search is unable to collapse the title into one either because of this.

Anyone know more about how to resolve this at the source?

March 25th, 2015 5:42pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics