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

Problem with Double Quote Inside the SourceUrl of a RadHtmlPlaceHolder

6 Answers 90 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Junlan
Top achievements
Rank 1
Junlan asked on 29 Mar 2012, 04:39 PM
If there is a double quote inside the SourceUrl of a RadHtmlPlaceHolder, the url will be trimmed. For example,
when SourceUrl = " http://duckduckgo.com?q=renewable energy ""2012""", in the iFrame it would be src=http://duckduckgo.com?q=renewable engery . I've also tried  " http://duckduckgo.com?q=renewable energy %222012%22". It doesn't work as well. Is there a way to insert double quotes into the SourceUrl?

 

6 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 03 Apr 2012, 03:46 PM
Hello JunLan,

 The SourceUrl is of type System.Uri so the problem is more related to escaping "" - two adjacent double quotation marks in Uri. I believe that ""5555"" should be replaced with %22%225555%22%22 but not 
%225555%22. Hope this helps you.

Kind regards,
Petar Mladenov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Junlan
Top achievements
Rank 1
answered on 03 Apr 2012, 06:29 PM
Petar,

Thank you for your reply. I tried "%22%22renewable energy%22%22" both in the xaml and the code behind. It doesn't work. Could you try that to see if it works?
0
Maksym
Top achievements
Rank 1
answered on 05 Apr 2012, 11:01 PM
Hi,

I have a similar problem with escaping of characters in SourceUrl property.

My guess is that RadHtmlPlaceholder uses SourceUrl.ToString() instead of SourceUrl.AbsoluteUri when providing uri to iframe.

Best Regards,
Maksym
0
Petar Mladenov
Telerik team
answered on 06 Apr 2012, 08:34 AM
Hello Maksym and Junlan,

The RadHtmlPlaceholder gives to the underlying iframe the Uri.OriginalString. Check the following lines:

 Uri uri = new Uri("http://abbbb.com:/aa%22%22renewable energy%22%22");
Debug.WriteLine(uri.OriginalString);
This Prints: http://abbbb.com:/aa%22%22renewable energy%22%22 This will be the string passed to the iframe src property.

Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Maksym
Top achievements
Rank 1
answered on 06 Apr 2012, 09:33 AM
Hello Petar,

I rechecked (with Fiddler), and at least on version 2011.2.1004.1040 of Telerik controls it doesn't use Uri.OriginalString.
It behaves as if it uses SourceUrl.ToString().

Best Regards,
Maksym
0
Petar Mladenov
Telerik team
answered on 11 Apr 2012, 08:07 AM
Hello Maksym,

 You are right. Indeed, in Q2.2011.1004 the RadHtmlPlaceholder gives the underlying Iframe SourceUrl.ToString(). The SourceUrl.OriginalString is change introduced in the official Q1 2012 (0215).
Please excuse me for not explaining this correctly.

All the best,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
HTMLPlaceHolder
Asked by
Junlan
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Junlan
Top achievements
Rank 1
Maksym
Top achievements
Rank 1
Share this question
or