Copied to clipboard

Flag this post as spam?

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


  • Pete K 317 posts 56 karma points
    Mar 07, 2014 @ 14:57
    Pete K
    0

    How to preserve domain name in links

    I can't seem to get Umbraco (version 4.6.1) to stop stripping out the local domain name from URLs entered in the HTML (or UI) using the RTE. This is a problem because I am providing links to RSS readers. For example:

    <a href="http://feedly.com/#subscription/feed/http://www.fcps.net/tools/rss-feeds/feature-articles">

    When I save the edit, Umbraco (or TinyMCE) removes "http://www.fcps.net" from the string, leaving an invalid RSS link to get sent to Feedly. 

    Some have suggested in other threads changing two settings in the TinyMCE config:

    convert_urls=0
    remove_script_host=0

    This does not seem to have any effect. Surely there must be a solution to this. Can anyone help?

  • Sébastien Richer 194 posts 430 karma points
    Jun 18, 2014 @ 19:13
    Sébastien Richer
    0

    I have this issue also, interested in workarounds!

  • Pete K 317 posts 56 karma points
    Jun 18, 2014 @ 19:45
    Pete K
    0

    Sébastien, unfortunately I never did get this to work in the RTE. Since it was only a problem for me on one particular page, I solved the issue by creating a doctype for the page where the body text uses a "textbox multiple" control rather than the RTE. This means I have to enter raw HTML into the control rather than having the nice rich text editor but the page rarely changes so for me it's not an issue anymore. 

  • Sébastien Richer 194 posts 430 karma points
    Jun 18, 2014 @ 22:48
    Sébastien Richer
    0

    Thanks Pete, this is my current workaround. I feel like a veryvery bad person now :)

    @(new HtmlString(CurrentPage.bloc4Texte.ToString().Replace("href=\"/media/", "href=\"" + Request.Url.GetLeftPart(UriPartial.Authority) + "/media/")))

     

  • Erni Durdevic 1 post 21 karma points
    Sep 30, 2014 @ 17:27
    Erni Durdevic
    0

    You can bind the Umbraco website to two different domains (www.yourdomain.con and for instance admin.yourdomain.com).

    If you log into umbraco using admin.yourdomain.com/Umbraco/ you can easily insert absolute URL to www.yourdomain.com using the standard umbraco controls.

    By logging into a different domain, the remove_script_host configuration does not recognize your primary domain, so the URL remains absolute ;-)

Please Sign in or register to post replies

Write your reply to:

Draft