Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to insert notes:// link?

1,624 views
Skip to first unread message

jacko

unread,
Apr 12, 2007, 11:14:02 PM4/12/07
to
When editing a document on sharepoint (using the richtext editing), for
example in a wiki page, trying to insert a Lotus Notes hyperlink to notes://
using the Insert Hyperlink button, i get an error saying "hyperlinks must
begin with http:// ftp:// etc".

i tried using the Edit HTML Source and entered <a
href="notes://lotusdomino.com">Link to Lotus Notes</a> but MOSS automatically
omits the link in the code upon saving the document, leaving the text not
clickable.

Anyway to overcome this? Or how can I disable MOSS so that it doesnot
validate the hyperlink protocols?

Thanks in advance!

Justin Kobel

unread,
Apr 13, 2007, 4:44:03 PM4/13/07
to
You should be able to edit the validator that verifies the correct links.
Note that if you install any hot fixes, service packs, upgrades, etc. this
will probably need to be redone.

1) Open the Core.js file located at C:\Program Files\Common Files\Microsoft
Shared\web server extensions\12\TEMPLATE\LAYOUTS\INC with your preferred
Javascript editor (Visual Studio, Notepad, SharePoint Designer).

2) Search for a line that contains "Hyperlink.arrAllowedProtocols".

3) Add "notes://" to the comma delimited list following the AllowedProtocols
line.

4) Go to a browser, Ctrl + F5 to force a full refresh of all javascript
files, and test the new validator expression.

Good Luck

Justin Kobel

jacko

unread,
Apr 15, 2007, 9:38:01 PM4/15/07
to
Justin, thanks!

I followed your guidance but yet still getting the error. I then searched
for core.js in the server and found another core.js in C:\Program

Files\Common Files\Microsoft Shared\web server

extensions\12\TEMPLATE\LAYOUTS\1033. I searched for mailto: and found a
function IsSafeHref that validates the url href. I am not a programmer nor
developer, thus I don't understand the script, and simply copy-paste the
syntax, added a line href.match(new RegExp("^notes://", "i")) || to the
function. Lol, moss now allows me to add notes://lotusdominoserver.com with
no returned error!!

Unfortunately, upon saving the moss page, the link "notes://" in <a
href=></a> again is again automatically removed by moss, leaving a
non-clickable text. I searched the script to see if I could hack again, but
to no avail since I don't hv script knowledge.

Now I seek for your (and others) expertise on the missing part on how to
disable moss server to validate the url upon saving.

Thanks in advance!!

Regards,
Jacko

jacko

unread,
Apr 18, 2007, 12:16:01 AM4/18/07
to
anyone can help?

Cornelius J. van Dyk [MVP]

unread,
Apr 18, 2007, 9:36:19 AM4/18/07
to
If you're editing rich text, be sure that all your rich text editing is
DONE before switching to HTML edit view to make the URL changes. Then
save it from HTML view and please remember that you can NEVER go back to
use rich text view as it will break the HTML links.

--
Thanks
C
Blog: http://www.cjvandyk.com/blog
RSS: http://feeds.feedburner.com/cjvandyk


"jacko" <ja...@discussions.microsoft.com> wrote in message
news:17567381-F4E3-46B1...@microsoft.com:

jacko

unread,
Apr 19, 2007, 6:00:00 AM4/19/07
to
Yes, I tried that but still can't keep the notes://server.com.

Fyi, I am using MOSS2007. When I clicked on Edit HTML Source, a dialog
window pops up to allow me to write the HTML code. I added desired
notes://server.com by HTML code <a href="notes://server.com">Lotus Notes
link</a>. Click OK to exit the HTML dialog window, and click OK again (on the
main window) to save. Once save, you can see Lotus Notes link is underlined
like usual hyperlink text, but it's not clickable when you hover the mouse
cursor to it. When you check back the HTML code, it left <a>Lotus Notes
link</a>.

Micah Nasarow

unread,
Apr 19, 2007, 9:01:22 PM4/19/07
to
Greetings,

I would like to jump on this thread to get some information on the same
issue. Using MOSS 2007 Page Content publishing controls, when using the
HTML edit feature of the control saving strips out any onlicks or javascript
calls that I want to make from anchor tag links in the document.

Is there an admin permissions setting to allow for this? Or are we using
the wrong control.

I am very confused that I can not just publish html text with image buttons,
links with onlick events or src=javascript:somefunction();.

Thanx

Micah

"jacko" <ja...@discussions.microsoft.com> wrote in message

news:A623EE07-8B5B-4DD4...@microsoft.com...

jacko

unread,
Apr 20, 2007, 11:40:04 AM4/20/07
to
ok. I know what you meant by "NEVER go back to use rich text view". This is
possible when using webpart such as Content Editor webpart, I tried it and
the notes://dominoserver.com is added successfully. But if you try to do it
in a wiki page or blog posting, it can't be achieved. Any solution?

"Cornelius J. van Dyk [MVP]" wrote:

Michael McCloskey

unread,
Apr 4, 2011, 8:59:31 PM4/4/11
to
The way I have always accomplished this (MOSS 2007) is to create the html web page in Dreamweaver (any web editor will do), then use a Page Viewer Web Part to display the html page. All notes links (notes://server/db.nsf) are functional.


>> On Friday, April 13, 2007 4:44 PM JustinKobe wrote:

>> You should be able to edit the validator that verifies the correct links.
>> Note that if you install any hot fixes, service packs, upgrades, etc. this
>> will probably need to be redone.
>>
>> 1) Open the Core.js file located at C:\Program Files\Common Files\Microsoft
>> Shared\web server extensions\12\TEMPLATE\LAYOUTS\INC with your preferred
>> Javascript editor (Visual Studio, Notepad, SharePoint Designer).
>>
>> 2) Search for a line that contains "Hyperlink.arrAllowedProtocols".
>>
>> 3) Add "notes://" to the comma delimited list following the AllowedProtocols
>> line.
>>
>> 4) Go to a browser, Ctrl + F5 to force a full refresh of all javascript
>> files, and test the new validator expression.
>>
>> Good Luck
>>
>> Justin Kobel
>>
>>
>>
>> "jacko" wrote:


>>> On Sunday, April 15, 2007 9:38 PM jack wrote:

>>> Justin, thanks!
>>>
>>> I followed your guidance but yet still getting the error. I then searched
>>> for core.js in the server and found another core.js in C:\Program
>>> Files\Common Files\Microsoft Shared\web server
>>> extensions\12\TEMPLATE\LAYOUTS\1033. I searched for mailto: and found a
>>> function IsSafeHref that validates the url href. I am not a programmer nor
>>> developer, thus I don't understand the script, and simply copy-paste the
>>> syntax, added a line href.match(new RegExp("^notes://", "i")) || to the
>>> function. Lol, moss now allows me to add notes://lotusdominoserver.com with
>>> no returned error!!
>>>
>>> Unfortunately, upon saving the moss page, the link "notes://" in <a
>>> href=></a> again is again automatically removed by moss, leaving a
>>> non-clickable text. I searched the script to see if I could hack again, but
>>> to no avail since I don't hv script knowledge.
>>>
>>> Now I seek for your (and others) expertise on the missing part on how to
>>> disable moss server to validate the url upon saving.
>>>
>>> Thanks in advance!!
>>>
>>> Regards,
>>> Jacko
>>>
>>> "Justin Kobel" wrote:


>>>> On Wednesday, April 18, 2007 12:16 AM jack wrote:

>>>> anyone can help?
>>>>
>>>> "jacko" wrote:


>>>>> On Thursday, April 19, 2007 6:00 AM jack wrote:

>>>>> Yes, I tried that but still can't keep the notes://server.com.
>>>>>
>>>>> Fyi, I am using MOSS2007. When I clicked on Edit HTML Source, a dialog
>>>>> window pops up to allow me to write the HTML code. I added desired
>>>>> notes://server.com by HTML code <a href="notes://server.com">Lotus Notes
>>>>> link</a>. Click OK to exit the HTML dialog window, and click OK again (on the
>>>>> main window) to save. Once save, you can see Lotus Notes link is underlined
>>>>> like usual hyperlink text, but it's not clickable when you hover the mouse
>>>>> cursor to it. When you check back the HTML code, it left <a>Lotus Notes
>>>>> link</a>.
>>>>>
>>>>>

>>>>> "Cornelius J. van Dyk [MVP]" wrote:


>>>>>> On Thursday, April 19, 2007 9:01 PM Micah Nasarow wrote:

>>>>>> Greetings,
>>>>>>
>>>>>> I would like to jump on this thread to get some information on the same
>>>>>> issue. Using MOSS 2007 Page Content publishing controls, when using the
>>>>>> HTML edit feature of the control saving strips out any onlicks or javascript
>>>>>> calls that I want to make from anchor tag links in the document.
>>>>>>
>>>>>> Is there an admin permissions setting to allow for this? Or are we using
>>>>>> the wrong control.
>>>>>>
>>>>>> I am very confused that I can not just publish html text with image buttons,
>>>>>> links with onlick events or src=javascript:somefunction();.
>>>>>>
>>>>>> Thanx
>>>>>>
>>>>>> Micah
>>>>>>

>>>>>> "jacko" <ja...@discussions.microsoft.com> wrote in message

>>>>>> news:A623EE07-8B5B-4DD4...@microsoft.com...

Michael McCloskey

unread,
Apr 4, 2011, 9:07:23 PM4/4/11
to
The way I have always managed this is to create a separate html page with the Notes links using Dreamweaver (any html editor will do), then use a Page Viewer Web Part to display the html page. All Notes/Domino links (notes://server/database.nsf) are functional.

> On Thursday, April 12, 2007 11:14 PM jack wrote:

Sai Bolla

unread,
Apr 5, 2011, 11:05:49 AM4/5/11
to
We had similar kind of issue with "notes" filed (description) in a blogs site. Here is what I noticed, When the form is being saved, The notes is trimming certain tags before saving the content. We have this issue when we tried to add "object" tags. This could be because of security limitations that MS implemented for SQL end.

We extended the "SPFieldMultiLineText", "BaseFieldControl" classes to encode the field value before saving the content by the base class.

public class ExtField : SPFieldMultiLineText //SPFieldText
{
public ExtField(SPFieldCollection fields, string fieldName)
: base(fields, fieldName)
{ }

public ExtField(SPFieldCollection fields, string typeName, string displayName)
: base(fields, typeName, displayName)
{ }

public override string GetValidatedString(object value)
{
return value.ToString();
}

public override BaseFieldControl FieldRenderingControl
{
get
{

BaseFieldControl fieldControl = new ExtFieldControl();

fieldControl.FieldName = this.InternalName;

return fieldControl;
}
}

}


[SharePointPermission(SecurityAction.InheritanceDemand, ObjectModel = true), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal), SharePointPermission(SecurityAction.LinkDemand, ObjectModel = true), AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class ExtFieldControl : BaseFieldControl //RichTextField
{
protected editor Editor;

// Methods
public ExtFieldControl()
{
}

protected override string DefaultTemplateName
{

get { return "ExtTextField"; }

}


/// <summary>
/// Encode and decode the value in order to avoid the replacement of text by sharepoint framework (like <embeed></embeed> tags)
/// </summary>
public override object Value
{

get
{

EnsureChildControls();

return SPHttpUtility.HtmlEncode(RemoveEmptyDiv(Editor.Value));

}

set
{

try
{

EnsureChildControls();
Editor.Value = SPHttpUtility.HtmlDecode(value.ToString());
}

catch { }

}
}

public override void Focus()
{
EnsureChildControls();
Editor.Focus();

}
protected override void CreateChildControls()
{
try
{

if (Field == null) return;

base.CreateChildControls();

//Don't render the textbox if we are just displaying the field
if (ControlMode == Microsoft.SharePoint.WebControls.SPControlMode.Display) return;

Editor = (editor)TemplateContainer.FindControl("TextField");

if (FckEditor == null) throw new NullReferenceException("TextField(Body) is null");

//Editor.BasePath = GetBasePath(); user "_layouts" folder. This property is configured witin the rendering template itself

if (ControlMode == Microsoft.SharePoint.WebControls.SPControlMode.New)
Editor.Value = "";
}
catch(Exception ex)
{}
}
}

}

Basically we created a new field and deployed it as a feature then used this extended field instead of inbuilt "Notes" field.

this "http://www.sharethispoint.com/archive/2006/08/07/23.aspx" help you how to create a custom field type

Hope this should help you.


Diego VIoli

unread,
Apr 14, 2011, 9:16:16 AM4/14/11
to
Hi JustinKobe,

the solution doesn't works on SharePoint Server 2010.

Do you have any suggestions?

> On Thursday, April 12, 2007 11:14 PM jack wrote:

> When editing a document on sharepoint (using the richtext editing), for
> example in a wiki page, trying to insert a Lotus Notes hyperlink to notes://
> using the Insert Hyperlink button, i get an error saying "hyperlinks must
> begin with http:// ftp:// etc".
>
> i tried using the Edit HTML Source and entered <a
> href="notes://lotusdomino.com">Link to Lotus Notes</a> but MOSS automatically
> omits the link in the code upon saving the document, leaving the text not
> clickable.
>
> Anyway to overcome this? Or how can I disable MOSS so that it doesnot
> validate the hyperlink protocols?
>
> Thanks in advance!

>> On Friday, April 13, 2007 4:44 PM JustinKobe wrote:

>> You should be able to edit the validator that verifies the correct links.
>> Note that if you install any hot fixes, service packs, upgrades, etc. this
>> will probably need to be redone.
>>
>> 1) Open the Core.js file located at C:\Program Files\Common Files\Microsoft
>> Shared\web server extensions\12\TEMPLATE\LAYOUTS\INC with your preferred
>> Javascript editor (Visual Studio, Notepad, SharePoint Designer).
>>
>> 2) Search for a line that contains "Hyperlink.arrAllowedProtocols".
>>
>> 3) Add "notes://" to the comma delimited list following the AllowedProtocols
>> line.
>>
>> 4) Go to a browser, Ctrl + F5 to force a full refresh of all javascript
>> files, and test the new validator expression.
>>
>> Good Luck
>>
>> Justin Kobel
>>
>>
>>
>> "jacko" wrote:


>>> On Sunday, April 15, 2007 9:38 PM jack wrote:

>>> Justin, thanks!
>>>
>>> I followed your guidance but yet still getting the error. I then searched

>>> for core.js in the server and found another core.js in C:\Program

>>> Files\Common Files\Microsoft Shared\web server


>>>>>>>>> On Monday, April 04, 2011 9:07 PM Michael McCloskey wrote:

>>>>>>>>> The way I have always managed this is to create a separate html page with the Notes links using Dreamweaver (any html editor will do), then use a Page Viewer Web Part to display the html page. All Notes/Domino links (notes://server/database.nsf) are functional.

0 new messages