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?
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.