4

I've created a list and view in SharePoint 2013.

The out of the box 'Title' field doesn't lend itself very well to this list, so I've created another field called 'Brief Summary' and duplicated the Title link behaviour using linkToItem="TRUE".

The view is defined as follows...

<ViewFields>
    <FieldRef Name="BriefSummary" ListItemMenu="TRUE" linkToItem="TRUE"/>
    <FieldRef Name="Date"/>
    <FieldRef Name="Location"/>
</ViewFields>

<RowLimit Paged="TRUE">30</RowLimit>

<Aggregations Value="Off"/>

<JSLink>clienttemplates.js</JSLink>

<XslLink>main.xsl</XslLink>

<Toolbar Type="Standard"/>

I have however noticed an unexpected issue in that when the BriefSummary contains certain characters, these characters are encoded. For example; the link to "Ben's Brief Summary" appears in the list view as "Ben&#39 ;s Brief Summary" (without the space between 9 and ;).

This only seems to be an issue when using linkToItem on custom fields. When the Title with Link is used, characters are not encoded.

Is there a way of preventing character encoding on custom fields with a linkToItem?

  • Its becuse u used plain text use Rich text – Shiva Jan 5 '16 at 12:07
  • If I use rich text the apostrophe isn't encoded, however, <div> tags are displayed before and after. EG; Appears in view as.. <div class="ExternalClass1E57A70015F042C4A0BC2BEDD5FCFAFC">Ben's Brief Summary</div> – Dane Jan 6 '16 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.