Discussion:
how to insert notes:// link?
(too old to reply)
jacko
2007-04-13 03:14:02 UTC
Permalink
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
2007-04-13 20:44:03 UTC
Permalink
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
Post by jacko
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!
jacko
2007-04-16 01:38:01 UTC
Permalink
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
Post by Justin Kobel
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
Post by jacko
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!
jacko
2007-04-18 04:16:01 UTC
Permalink
anyone can help?
Post by jacko
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
Post by Justin Kobel
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
Post by jacko
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!
Cornelius J. van Dyk [MVP]
2007-04-18 13:36:19 UTC
Permalink
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
Post by jacko
anyone can help?
Post by jacko
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
Post by Justin Kobel
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
Post by jacko
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!
jacko
2007-04-19 10:00:00 UTC
Permalink
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>.
Post by Cornelius J. van Dyk [MVP]
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
Post by jacko
anyone can help?
Post by jacko
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
Post by Justin Kobel
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
Post by jacko
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!
Micah Nasarow
2007-04-20 01:01:22 UTC
Permalink
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
Post by jacko
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>.
Post by Cornelius J. van Dyk [MVP]
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
Post by jacko
anyone can help?
Post by jacko
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
Post by Justin Kobel
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
Post by jacko
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!
jacko
2007-04-20 15:40:04 UTC
Permalink
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?
Post by Cornelius J. van Dyk [MVP]
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
Post by jacko
anyone can help?
Post by jacko
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
Post by Justin Kobel
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
Post by jacko
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!
Diego VIoli
2011-04-14 13:16:16 UTC
Permalink
Hi JustinKobe,

the solution doesn't works on SharePoint Server 2010.

Do you have any suggestions?
Post by jacko
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!
Post by Justin Kobel
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
Post by jacko
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
Post by jacko
anyone can help?
Post by jacko
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>.
Post by Micah Nasarow
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
Post by jacko
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?
Post by Michael McCloskey
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.
Post by Michael McCloskey
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.
Post by Sai Bolla
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.
Michael McCloskey
2011-04-05 00:59:31 UTC
Permalink
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.
Post by jacko
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!
Post by Justin Kobel
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
Post by jacko
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
Post by jacko
anyone can help?
Post by jacko
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>.
Post by Micah Nasarow
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
Post by jacko
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?
Michael McCloskey
2011-04-05 01:07:23 UTC
Permalink
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.
Post by jacko
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!
Post by Justin Kobel
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
Post by jacko
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
Post by jacko
anyone can help?
Post by jacko
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>.
Post by Micah Nasarow
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
Post by jacko
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?
Post by Michael McCloskey
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.
Sai Bolla
2011-04-05 15:05:49 UTC
Permalink
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.
Loading...