Add new accepted protocol to URL/link validation i

2019-07-16 19:26发布

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.

My hope is that SP2010 addresses a way of getting around this issue. Any help would be greatly appreciated.

3条回答
地球回转人心会变
2楼-- · 2019-07-16 19:39

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.

查看更多
SAY GOODBYE
3楼-- · 2019-07-16 19:43

You can insert a script editor web part and type the <a href=''>link</a> manually

查看更多
Summer. ? 凉城
4楼-- · 2019-07-16 19:57

I made it as simple as the following using OOB without SP Designer:

  1. insert a "Content Editor" or "HTML Form" Web Part
  2. Click on Edit page
  3. Click inside the web part
  4. Click on insert from the top
  5. Select Link, From Address
  6. 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.

查看更多
登录 后发表回答