Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Probocop 51 posts 71 karma points
    Aug 27, 2010 @ 11:54
    Probocop
    0

    Escape HTML entities in umbraco.library:NiceUrl()?

    Hi,

    On the site I'm currently working on I have a sidebar panel which lists the 3 newest news articles. But I've come across a problem with a '%' in one of the news article titles URLs.

    So I have the following HTML

    <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="data [@alias = 'newsHeadline']" /></a>

    How would I replace any troublesome characters such as a percent sign with the correct HTML entity in 'umbraco.library:NiceUrl(@id)'

    Thanks!

    Dave

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Aug 27, 2010 @ 12:26
    Chriztian Steinmeier
    0

    There's a setting in one of the config files that handle special characters in URLs, if I remember correct -- might be the best place to handle that?

    (Otherwise, you could use the umbraco.library:Replace() function to replace in the result from NiceUrl())

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft