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!
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
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
--
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:
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>.
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...
"Cornelius J. van Dyk [MVP]" wrote:
>> 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...
> On Thursday, April 12, 2007 11:14 PM jack wrote:
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.
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.