Kupu makes relative urls: how can I suppress that

classic Classic list List threaded Threaded
3 messages Options
redcor redcor
Reply | Threaded
Open this post in threaded view
|

Kupu makes relative urls: how can I suppress that

Kupu converts absolute urls to relative urls.
This is normaly OK,
but I want to create emails from some kupu-edited documents.
Then I need the absolute urls.

How can I prevent kupu to convert the urls?
What kupu version is needed ?

thanks
Robert


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Duncan Booth-4 Duncan Booth-4
Reply | Threaded
Open this post in threaded view
|

Re: Kupu makes relative urls: how can I suppress that

robert rottermann wrote:

> Kupu converts absolute urls to relative urls.
> This is normaly OK,
> but I want to create emails from some kupu-edited documents.
> Then I need the absolute urls.
>
> How can I prevent kupu to convert the urls?

Easy, just edit the javascript so that
KupuEditor.prototype.makeLinksRelative is a function which simply returns
its first parameter unchanged.

But, be aware it probably won't do what you want. The reason Kupu converts
absolute urls to relative is to ensure a consistent behaviour: without the
conversion you will get absolute links when a document is edited with IE
and relative links from Mozilla. If you want your email to contain absolute
links then you'll have to convert all of Mozilla's relative links to
absolute, and if you do that server-side (e.g. write a portal transform)
then there is no need to hack Kupu. Also you'll have to be extremely
careful to ensure that the URL used to access the Plone site when editing
the document is still valid when the end user reads the email (so no
editing pages through localhost:8080).

A simpler solution, it would seem to me, would be to leave all the URLs as
relative and just put a sensible <base> tag into your emails.



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Vranesic Ogi Vranesic Ogi
Reply | Threaded
Open this post in threaded view
|

Re: Re: Kupu makes relative urls: how can I suppress that


Duncan,
thanks a lot,
> A simpler solution, it would seem to me, would be to leave all the URLs as
> relative and just put a sensible <base> tag into your emails.

stupid me !!

Robert


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users