Copied to clipboard

Flag this post as spam?

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


  • Kevin Lawrence 183 posts 350 karma points
    Mar 19, 2014 @ 18:25
    Kevin Lawrence
    0

    Are parsed links supposed to be encoded? (6.1.6)

    Hi all

    We have noticed that urls (i.e. {locallink}) are not encoded, unfortunately for us we need our urls to be html-encoded, so £ would become £ etc.

    Is this typically supported by Umbraco out of the box?

    Thanks

    Kev

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 19, 2014 @ 20:04
    Jan Skovgaard
    0

    Hi Kevin

    Yes the localink stuff is the way things work out of the box.

    But could you ellaborate a bit more on your scenario? I'm not sure I get why it's important to you that the url contains £ etc. - Perhaps there is another way around it.

    Looking forward to hearing from you.

    /Jan

  • Kevin Lawrence 183 posts 350 karma points
    Mar 19, 2014 @ 21:41
    Kevin Lawrence
    0

    Hi Jan

    It's a local government website which is a AA site, and it fails our accessibility checks if the urls in our anchors are not encoded, frequently this is caused by &'s in the url but as we transition over to Umbraco we are noticing it with our internal urls, we have some pretty crazy page names in there which contain special characters.

    Does that answer your query?

    Thanks

    Kev

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 19, 2014 @ 21:46
    Jan Skovgaard
    0

    Hi Kevin

    Hmm, we have some of the same requirements for danish sites and we have never failed at this...that sounds a bit odd to me.

    Could you provide some examples of link text where this is happening? How do you render the content from the rich text editor?

    Do you have a link to a site perhaps?

    /Jan

  • Kevin Lawrence 183 posts 350 karma points
    Mar 19, 2014 @ 21:53
    Kevin Lawrence
    0

    Hi Jan

    Sure, here is a link to a page on our website, if you check-out around line 409 you will see a link that has been rendered from the RTE (so {locallink}), note the link title has been encoded:

    <a title="Invoices over &pound;500" href="/council-and-democracy/council-spending-and-budgets/payments-to-suppliers-where-the-invoiced-payments-are-greater-than-or-equal-to-£500/">Payments to suppliers where the invoiced payments are greater than or equal to &pound;500a>

    Here is the page in question:

    http://test.cornwall.gov.uk/council-and-democracy/council-spending-and-budgets/

    The failure we are getting reported on is the href, everything else is fine, I did notice that our navigation does indeed render the correctly encoded links, it's just the ones in the RTE.

    Thanks

    Kev

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 19, 2014 @ 22:16
    Jan Skovgaard
    0

    Hi Kevin

    Hmm I see...ok, by default Umbraco should actually make sure that character newer makes it to the out-url...

    I just ran a quick test on v7 where I had a page named "Let's make it £500 please". On another page I made a link to this page in the rte field and the out url was "lets-make-it-500-please".

    But it should be possible to fix this in 6.1.6 as well.

    Try going to /config/umbracoSetting.config and go to the <urlReplacing> section and add

    <char org="£"></char>
    <char org="&pound;"></char> 

    Recycle your app pool and see if it works - it should! :)

    Hope this helps.

    /Jan

  • Kevin Lawrence 183 posts 350 karma points
    Mar 19, 2014 @ 22:28
    Kevin Lawrence
    0

    Hi Jan

    I will give this a go first thing in the morning and get back to you.

    Thanks very much for your help :-)

    Kev

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 19, 2014 @ 22:35
    Jan Skovgaard
    0

    Hi Kevin

    You're welcome.

    Btw make sure that the site on your test-server is not indexed by setting up <meta name="robots" content="noindex,nofollow" /> for the entire site. Otherwise your client risks SEO issues with duplicate content.

    Looking forward to hearing from you tomrrow.

    /Jan

  • Kevin Lawrence 183 posts 350 karma points
    Mar 20, 2014 @ 00:27
    Kevin Lawrence
    0

    Will do, thanks for the tip :-)

  • Kevin Lawrence 183 posts 350 karma points
    Mar 20, 2014 @ 10:32
    Kevin Lawrence
    0

    Hi Jan

    Morning!

    I tried your change but it didn't work, like I say it does appear to work for my navigation links etc. it's just the RTE.

    Anything else I can try?

    Thanks

    Kev

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 20, 2014 @ 10:47
    Jan Skovgaard
    0

    Hi Kevin

    Hmm, that's odd...how about if you go to the page in Umbraco and delte the link from the rich text editor and isert it once again?

    And you did remember to recycle the app pool after making the changes in the umbracoSettings.config?

    Not that I think it matters but do you know what encoding are used for your templates? Is it UTF-8?

    /Jan

  • Kevin Lawrence 183 posts 350 karma points
    Mar 20, 2014 @ 10:51
    Kevin Lawrence
    0

    Hi Jan

    Yep recycled pool, even changed another setting to make sure it was picking up the changes.

    We are using UTF-8.

    Kev

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 20, 2014 @ 10:53
    Jan Skovgaard
    0

    Hi Kevin

    Ok, do you mind sharing the part of your umbracoSettings.config that contains the rewrite stuff?

    Did you try and pick the link again or even just save the page where the £ link is on? Coming to think about it this is probably needed as well since now the sign is saved in the XML cache.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft