开发者

SharePoint HTML Editor Field Control Converts Relative URL to Absolute URL

Put a relative URL (no server name) into the HTML Edi开发者_如何学Gotor and save the page. The URL is converted to an absolute URL (http://server_name is added to the beginning).

This is posing a problem for moving content from our staging to production environment, as the server names are different.

The exact same scenario is common when using the Content Editor Web Part, and Microsoft has published a fix here:

http://code.msdn.microsoft.com/WssCewpLinkFixup/Release/ProjectReleases.aspx?ReleaseId=2210

The solution creates a custom ASP.NET 2.0 control adapter to change the rendering process of all Content Editor Web Parts in the application.

But we are using the HTML Editor Field Control, not the Content Editor Web Part.

Can the same approach be used to change the behavior of a web part?

Has anyone else encountered this problem and solved it? A Google search has come up with no answers, only many frustrated users and abandoned forum threads, including this one on StackOverflow from a year ago:

Publishing HTML Field Control Converts Relative URL to Absolute URL

Many thanks in advance.


You may be able to put a little bit of JavaScript in the link, either

<a href="javascript:location='page.aspx';">Link</a>

or

<a href="#" onclick="location='page.aspx';">Link</a>

Haven't tried it, but it may work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜