问题
I am trying to add a hyperlink in the content editor in sharepoint 2010. The problem is that the validation only allows certain accepted protocols (http, https, ftp, mailto, news, etc..). I need to add Lotus Notes link such as this: "notes://mydomain".
I found a few pages that had some solutions for SharePoint 2007, but they did not work for me.
- Allowing alternate protocols to be entered in link fields
- how to insert notes:// link?
My hope is that SP2010 addresses a way of getting around this issue. Any help would be greatly appreciated.
回答1:
You can insert a script editor web part and type the <a href=''>link</a>
manually
回答2:
Unfortunately I did not find a good solution, in my opinion. I really wanted to be able to modify some setting in SharePoint and allow other protocols. I went as far as trying to override the IsSafeHref() in core.js, but no luck. My final solution was to create a WebPart that reads the querystring and calls a redirect. Like so:
protected void Page_Load(object sender, EventArgs e)
{
string url = System.Web.HttpContext.Current.Request.QueryString["url"];
if (!string.IsNullOrEmpty(url))
{
Response.Redirect(url);
}
}
Hope it helps others out there.
回答3:
I made it as simple as the following using OOB without SP Designer:
- insert a "Content Editor" or "HTML Form" Web Part
- Click on Edit page
- Click inside the web part
- Click on insert from the top
- Select Link, From Address
- Type the text you need then type the link to Lotus "notes://server name/????"
To make it looks as 1 line you can select the value "none" for web part Chrome Type in the Appearance.
来源:https://stackoverflow.com/questions/5780738/add-new-accepted-protocol-to-url-link-validation-in-sharepoint-2010