mercredi 18 mars 2015

Prevent SharePoint from rendering email address as hyperlink



I try to render a simple text field value (e.g.: i:w#!|adfs|user@domain.local) as string (plain text) on a list with XSL.


By default SharePoint converts everything he thinks that is an email address or web address to a hyperlink. Unfortunately this even happens with XSL and even when I use output escaping:



<xsl:value-of select="@TextValue" disable-output-escaping="yes" />


Will be rendered as:



i:w#!|adfs|<a href="mailto:user@domain.local">user@domain.local</a>


But of course I simply want it to render as: i:w#!|adfs|user@domain.local


I tried to use:



<xsl:value-of select="substring-before(substring-after(@TextValue, '&gt;'), '&lt;')" disable-output-escaping="yes"/>


But this will cut of the first part (before "user...") as the anchor tag is already rendered. It would be perfect if I could just say somhow "please dear SharePoint give me just the plain text value of that field without messing around with it!".


Any ideas?








0 commentaires:

Enregistrer un commentaire