SharePoint - Custom Dataview - Link Display Issues

I have a custom SharePoint page with multiple data. Dataviews essentially filters documents that match certain criteria from a document library and displays a link to the document along with some other metadata.

The problem is that when the document has one quote in the title, the character appears as & # 39; and cancellation of the link. This is the code in my custom page showing an invalid link.

<A onfocus="OnLink(this)" HREF="{@FileRef}" onclick="return DispEx(this,event,'','','','','{ddwrt:ListProperty(&quot;DefaultItemOpen&quot;)}','{ddwrt:MapToControl(&quot;&quot;, string())}','{@HTML_x0020_File_x0020_Type}','','{ddwrt:GetUserID('CheckoutUser')}','{$Userid}','{ddwrt:ListProperty(&quot;ForceCheckout&quot;)}','{$FieldIDA5KNTB}','{ddwrt:CurrentRights()}')"><xsl:value-of select="ddwrt:UrlBaseName(string(@LinkFilename))" /></A>

      

Does anyone have any thoughts on how I can ensure that the @FileRef variable is correctly encoded before rendering?

Thank you very much in advance:)

+1


source to share


1 answer


you need to use ServerURL or EncodedAbsUrl properties, the guys already wrote this down:



Itay Shakury Blog

+3


source







All Articles