Copied to clipboard

Flag this post as spam?

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


  • Pete Brown 47 posts 77 karma points
    Feb 26, 2010 @ 19:45
    Pete Brown
    0

    Percent sign causes bad urls

    I noticed it first on the forums here: put the % sign in the subject and you won't be able to click on the post because it's not encoded when the URL is created.

    My regular umbraco installation does it as well.

    Where in config or code can I make the change to strip/encode the percent sign when generating the umbraco URL for a page/post?

    Umbraco 4.0.3

    Pete

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 26, 2010 @ 19:51
    Peter Dijksterhuis
    0

    Open up config/umbracoSettings.config

    There's a section requesthandler / urlReplacing there, it allready has a bunch of characters that are replaced.

    Add:

    <char org="%">-</char>

    Or replace the - with anything you want it replaced with.

    Peter

  • Pete Brown 47 posts 77 karma points
    Feb 26, 2010 @ 20:16
    Pete Brown
    0

    I did that earlier and the URLs didn't change. I even bounced the site.

    Do you need to republish or something for that to take effect?

    Pete

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 26, 2010 @ 20:21
    Douglas Robar
    0

    Yes, you need to publish pages after making a change to the urls.

    Either open the offending page(s) and click the Save & Publish button on the toolbar for each. Or right-click the top-most page(s) in your content tree and select the 'Publish' menu. Be sure to tick the 'children' box as well. That will publish all the pages in your site below the one you selected in one quick action.

    (Note that the 'Republish entire site' menu when you right-click the 'Content' node in the treeview is NOT the same thing and won't re-calculate urls).

    cheers,
    doug.

  • Pete Brown 47 posts 77 karma points
    Feb 26, 2010 @ 20:55
    Pete Brown
    0

    Thanks guys. That makes sense. Thanks also for the republish tip.

    Now, someone needs to make that change by default and also here on the forums :)

    Pete

Please Sign in or register to post replies

Write your reply to:

Draft