Copied to clipboard

Flag this post as spam?

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


  • Fergus Davidson 309 posts 588 karma points
    Mar 17, 2010 @ 11:35
    Fergus Davidson
    0

    urlReplacing ampersand - breaks tinyMCE

    hi

    i am working with a site which has a number of menu items/pages which contain and ampersand.

    the default replacement in the umbracoSettings.config is to replace the '&' with nothing.

    this leads to my having double dashes in the url as the preceding and following spaces are replaced with dashes.

    as the inclusion of double dashes is not very user friendly for a friendly url, i thought i would replace the ampersand with 'and'. this was all good UNTIL i tried to edit any content - none of the tinyMCE editors show up, due to some javascript error in the editContent page.

    i have reverted the umbracoSettings.config and all is well again on the edit front, but once again i have double hyphens in the urls.

    i am sure that there is a quick work-around for this as i am sure others have tried and succeeded with this problem, but i did a [quick] scan of the form and found nothing

    can anyone help me with this - would be much appreciated.

     

    thanks

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 17, 2010 @ 15:46
    Douglas Robar
    0

    Perhaps the easy thing to do is add another replacement in the umbracoSettings.config file to remove any "--" or "---" entries in the urls.

    The replacements are processed in order so just add these at the end of the list and you'll always get a single "-" between words in your urls...

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

    cheers,
    doug.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 17, 2010 @ 15:47
    Douglas Robar
    0

    Oh yes, one more thing...

    if you want to use urlRewriting you'll want to be more specific in your rules and make sure none of your urls that you transform begin with /umbraco or /umbraco_client

    cheers,
    doug.

  • Fergus Davidson 309 posts 588 karma points
    Mar 17, 2010 @ 16:11
    Fergus Davidson
    0

    thanks doug, went for the first solution, works perfectly

Please Sign in or register to post replies

Write your reply to:

Draft