MakePathsAbsolute error

4 posts, 1 answers
  1. Michelle
    Michelle avatar
    3 posts
    Member since:
    Dec 2008

    Posted 12 Nov 2009 Link to this post


    Greetings,

    I have been recently evaluating the RadEditor lite in my MOSS 2007 standard farm.  We are pleased with the cross-platform improvements.

    However, when you enter a URL in the form of say http://proxy.com:port  and then hit a space afterwards, it automatically makes it a link and then pops up an error that says "Error while executing filter MakePathsAbsolute - [object error]"

    I see this listed as fixed in http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q1-2008-sp1-version-2008-1-515.aspx your q1-2008-sp1 fix. 

    Does the Lite version not include bug fixes?  If not, does anyone have any advice on how to fix this? 


  2. Michelle
    Michelle avatar
    3 posts
    Member since:
    Dec 2008

    Posted 17 Nov 2009 Link to this post


    No update or advice on this issue?

  3. Answer
    Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 18 Nov 2009 Link to this post

    Hi Michelle,

    Add the following javascript code the the MOSSEditorTools.js file, which is located in the Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor\Scripts\7_3_6 folder.
    RadEditorNamespace.MakePathsAbsolute.prototype._updateElements = function(contentElement, tagName, attrName)
    {
        var tempDiv = contentElement.ownerDocument.createElement("div");
        var elements = this._getElements(contentElement, tagName);
        if (elements)
        {
            for (var i=0;i<elements.length;i++)
            {
                var attrValue = elements[i].getAttribute(attrName, 2);
                if ("href" == attrName && attrValue)
                {
                    tempDiv.innerHTML = "<a href=\""+attrValue.replace(/\"/gi,"%22") + "\">test</a>";
                    if (window.RadControlsNamespace.Browser.IsIE)
                    {
                        var origContent = elements[i].innerHTML;
                    }
                    elements[i].setAttribute("href", tempDiv.childNodes[0].getAttribute("href", 2));
                    if (window.RadControlsNamespace.Browser.IsIE)
                    {
                        //IE only issue - when setting the href attribute of a link and the link text also looks
                        //like a link/email then the text is overridden with the new href. We need to restore the
                        //original content
                        if ((origContent.indexOf("www.") == 0 && elements[i].innerHTML.match("[a-z]+://")) ||
                            (origContent.indexOf("mailto:") == -1 && elements[i].innerHTML.match("mailto:")))
                        {
                            elements[i].innerHTML = origContent;
                        }
                    }
                }
                else if ("src" == attrName && attrValue)
                {
                    tempDiv.innerHTML = "<img src=\""+attrValue.replace(/\"/gi,"%22") + "\" />";
                    elements[i].setAttribute("src", tempDiv.childNodes[0].src);
                }
            }
        }
        tempDiv.innerHTML = "";
        tempDiv = null;
    }

    This should fix the issue.

    Greetings,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Michelle
    Michelle avatar
    3 posts
    Member since:
    Dec 2008

    Posted 20 Nov 2009 Link to this post


    thanks!

    That seems to take care of the problem completely.

Back to Top