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

MakeUrlsAbsolute for some links, not all?

3 Answers 44 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dan Ehrmann
Top achievements
Rank 1
Dan Ehrmann asked on 09 Sep 2011, 05:20 PM
If I don't enable MakeUrlsAbsolute, then every link in the editor is made relative. In most cases, this is ok - I want relative links to pages within my site. But if a user wants to enter a link to an external site, it is a problem.

I see that if the link has no query string, it remains absolute. So, for example, <a href="http://www.yahoo.com"> remains unchanged. However, if I need any parameters, like <a href="http://www.yahoo.com/somepage?id=47">, then the domain is stripped and I end up with <a href="/somepage?id=47"> which will not work.

Is there any way to configure the editor to do this? Or will I have to use MakeUrlsAbsolute in all cases, and write a content filter to transform relative links?

3 Answers, 1 is accepted

Sort by
0
Dan Ehrmann
Top achievements
Rank 1
answered on 09 Sep 2011, 05:29 PM
more info -

what I really want is a 'leave my urls alone' setting - I am inserting urls relative or absolute as needed, and I would prefer that the editor not modify them at all
0
Rumen
Telerik team
answered on 13 Sep 2011, 09:21 AM
Hello Dan,

I am inserting urls relative or absolute as needed, and I would prefer that the editor not modify them at all - this is exactly how RadEditor works with links when MakeUrlsAbsolute filter is disabled. If you insert an absolute URL the editor will keep it absolute, if you enter relative url, it will remain relative.

Video with disabled MakeUrlsAbsolute filter: http://screencast.com/t/q2nFifn8.

I was also unable to reproduce the queristring problem as shown in this video: http://screencast.com/t/hbwtWcsTbed.



Greetings,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dan Ehrmann
Top achievements
Rank 1
answered on 13 Sep 2011, 05:03 PM
Sorry Rumen - this was a false alarm - one of my content filters was misbehaving

Thanx for the videos - they pointed me in the right direction
Tags
Editor
Asked by
Dan Ehrmann
Top achievements
Rank 1
Answers by
Dan Ehrmann
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or