This is a migrated thread and some comments may be shown as answers.

Encoding of Urls in Radeditor WCM

17 Answers 96 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Klaus
Top achievements
Rank 1
Klaus asked on 15 Oct 2012, 12:58 PM
Hi Telerik.

I have a standard Sharepoint 2010 environment using Telerik Radeditor WCM v 6.1.7.0.

1) Open hyperlink manager and create an anchor HøHø
2) Create a hyperlink using hyperlink manager and use the "Existing Anchor" dropdown and select HøHø.
3) Publish the page and the anchor link does not work.

It seems as if the anchor-link is encoded to the utf-8 version <a href="#H%c3%b8H%c3%b8">, but the anchor itself remains like <a name="HøHø". As effect, the hyperlink is not working in IE but works fine in Firefox.    

In the ConfigFile.xml I have ContentFilters=ConvertToXhtml, ConvertCharactersToEntities

Before the content is published, the anchor and the link is written with html entities as H&oslash; In RadEditorGetStorageHtml in SPEditorTools.js the value of editor.get_html(true) is also the correct using html entities.

Please advice.

Best regards
Klaus

17 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 17 Oct 2012, 01:10 PM
Hi Klaus,

Can you please provide the HTML which works on your end and I will help you to produce such HTML with RadEditor? Right now neither HøHø nor H%c3%b8H%c3%b8 or H&oslash; work in a standard HTML page on my end in IE.

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Klaus
Top achievements
Rank 1
answered on 17 Oct 2012, 01:19 PM
Hi Rumen,
thank you for following up.

Plain html like this works on my IE9.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <title>Untitled Page</title>
</head>
<body>
<a href="#HøHø">A Link</a>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Jump to here
<a id="HøHø"></a>
</body>
</html>

0
Klaus
Top achievements
Rank 1
answered on 17 Oct 2012, 01:23 PM
Hi Rumen,

thanks for getting back.
The following plain html works on my IE9.

<a href="#HøHø">A Link</a>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Jump to here
<a id="HøHø"></a>
0
Rumen
Telerik team
answered on 17 Oct 2012, 03:15 PM
Hello,

I was able to fix the issue by disabling the ContentFilters of RadEditor, e.g.

\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.5.0.0__1f131a624888eeed\Resources\ConfigFile.xml

<property name="ContentFilters">None</property>

For your convenience I recorded a video demonstrating my test: http://screencast.com/t/oTF2ppY60y.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Klaus
Top achievements
Rank 1
answered on 18 Oct 2012, 11:25 AM
Hi Rumen.

I can't seem to get it to work.

Before publish, the markup in html view looks ok. Like this:

<a href="#HøHø">A Link</a>
 
Jump to here
 
<a id="HøHø"></a>


After publish the markup is changed to this:

<a href="#H%c3%b8H%c3%b8">A Link</a>
 
Jump to here
 
<a id="HøHø"></a>



My ConfigFile.xml

<configuration>
  <property name="ContentAreaMode">Iframe</property>
  <property name="ContentFilters">None</property>
  <property name="DocumentsFilters">
    <item>*.*</item>
  </property>
  <property name="AllowScripts">true</property>
  <property name="NewLineBr">False</property>
  <property name="ToolbarMode">Floating</property>
  <property name="ToolbarMode">ShowOnFocus</property>
  <property name="ToolsWidth">570px</property>
  <property name="Skin">Telerik</property>
  <property name="Width">100%</property>
  <property name="Height">700px</property>
  <property name="MaxImageSize">524288</property>
  <property name="ImagesPaths">
    <item>/SiteCollectionImages</item>
    <item>PublishingImages</item>
    <item>Konverterede billeder</item>
  </property>
  <property name="DocumentsPaths">
    <item>Filer</item>
    <item>Sider</item>
  </property>
  <property name="FlashPaths">
    <item>/SiteCollectionImages</item>
  </property>
</configuration>


I use version 6.1.7.0 with Danish language pack installed.

Please advice.

- Klaus
0
Klaus
Top achievements
Rank 1
answered on 22 Oct 2012, 12:35 PM
Hi Rumen,

were you able to reproduce my case?

Best regards

- Klaus
0
Rumen
Telerik team
answered on 23 Oct 2012, 06:55 AM
Hi Klaus,

My suggestion is to upgrade to the latest build 6.5.0 of RadEditor for SharePoint 2010 and configure the editor as shown in the video provided in my earlier post (http://screencast.com/t/oTF2ppY60y).

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Klaus
Top achievements
Rank 1
answered on 23 Oct 2012, 01:46 PM
Hi Rumen.

I have downloaded and installed latest release as you suggested. However, the problem still persist.

But I have found out something else. The problem does not exist when the Radeditor webpart is manually inserted on a publishing page. The problem only exists with the richhtmlfields where Radeditor is used as editor.

Can you reproduce that behavior?

Best regards

- Klaus
0
Rumen
Telerik team
answered on 23 Oct 2012, 02:11 PM
Hi,

Can you please replace RadEditor with the built-in SharePoint editor and see whether the same behavior occurs in it? If the problem is reproducible this means that the content is encoded by the SharePoint content filters which cannot be disabled.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Klaus
Top achievements
Rank 1
answered on 23 Oct 2012, 02:57 PM
Hi Rumen,

thank you for fast reply :-)

I already tried that, and the built-in editor does not have the same problem.

- Klaus
0
Rumen
Telerik team
answered on 26 Oct 2012, 01:57 PM
Hello,

I found that the problem happens in non IE browsers.

You should do the following to solve this browser behavior:
1) To stop the conversion of ø to entity disable the ConvertCharactersToEntities filter by opening the \Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.5.0.0__1f131a624888eeed\Resources\ConfigFile.xml file and setting the ContentFilters property by skipping the ConvertCharactersToEntities filter:

<property name="ContentFilters">RemoveScripts,EncodeScripts,MakeUrlsAbsolute,FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,OptimizeSpans,ConvertToXhtml,IndentHTMLContent</property>

2) The next step is to implement a custom content filter which will replace the %C3%B8 url encoded character to ø character. This will fix the issue in the non IE browsers.

You can see this article for more information about the custom content filters: Converting Unicode symbols to numeric HTML entities using a content filter. See this article to learn how to register the filter in SharePoint environment: How to execute custom code called on RadEditor's events.

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Klaus
Top achievements
Rank 1
answered on 29 Oct 2012, 12:21 PM
Hi Rumen.

I have the problem in IE as well.

I have tried out your approach, and can see that it will work for new content. However, I am puzzled that this is really something that we must implement ourselves. Is this not standard functionality, since a lot of NON-US users with have this problem? Please confirm that this is not something that is suppose to work OOTB with Sharepoint 2010.

Another thing. Your suggestion works fine on fresh content that is just created, because the filter is applied. However, it doesn't solve the problem with already existing content. We have 50K+ pages in our recently upgraded sharepoint solution, and they may have this bookmark encoding error. The content is created with Radeditor in MOSS 2007, and now the problem is there in the upgraded Sharepoint 2010 solution. How do I fix this?

Best regards

Klaus
0
Rumen
Telerik team
answered on 01 Nov 2012, 04:09 PM
Hello,

You can attach to the OnClientLoad event of RadEditor and parse and modify the content directly once it is loaded in the content area and replace the %C3%B8 url encoded character to ø character.

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Klaus
Top achievements
Rank 1
answered on 02 Nov 2012, 08:30 AM
Hi Rumen.

Yes, I have that part with onclientload up and running. But as far as I can see, it only affects content when in design or edit mode.

My scenario is the following:

1) MOSS 2007 site with +50K pages with content created with RadEditor.
2) Upgraded to Sharepoint 2010
3) All bookmarks in the +50K pages are not working because of this encoding issue.

Editors can ofcourse edit the failing pages, and by using the onclientload workaround, the bookmarks will the be fixed. However, it is a huge task to edit all pages. Is this what you suggest?

Best regards

Klaus
0
Rumen
Telerik team
answered on 02 Nov 2012, 04:33 PM
Hi,

My idea was to replace the special symbols in the OnClientLoad event in addition to the custom content filter. This will ensure that if the user inserts special symbol they will be also converted when switching to HTML mode and when submitting the content.

Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Klaus
Top achievements
Rank 1
answered on 05 Nov 2012, 07:35 AM
Hi Rumen.

Thanks for your reply. As far as I can see, the onclientload is fired only when the page is in edit mode. This means that the thousands of pages that may contain wrongly encoded bookmarks need to be identified and manually put into edit mode and re-published in order to let the script kick in. Is this correct?

Cheers
Klaus
0
Stanimir
Telerik team
answered on 08 Nov 2012, 06:36 AM
Hello,

Unfortunately this is correct. You can try creating some custom SharePoint solution, which will iterate through all the pages and do the job on the server. However we can not provide you with such.

Regards,
Stanimir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Sharepoint Integration
Asked by
Klaus
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Klaus
Top achievements
Rank 1
Klaus
Top achievements
Rank 1
Stanimir
Telerik team
Share this question
or