Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-04-20 12:11:06

adam.jimenez
Xinha Pro
Registered: 2005-04-19
Posts: 50

Urls change from absoloute to relative

Hi,

I've written an image upload tool and am using the javascript:

editor.insertHTML('<img src="http://path/to/image.jpg">');

This works fine in firefox.

But in IE the path is automatically changed to a relative one!

Is this a known bug? Or is there a work-around?

Many thanks,
Adam

Offline

#2 2005-04-21 06:36:42

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Urls change from absoloute to relative

Check the stripBaseURL config setting.


James Sleeman

Offline

#3 2005-04-21 07:28:55

adam.jimenez
Xinha Pro
Registered: 2005-04-19
Posts: 50

Re: Urls change from absoloute to relative

Thanks a lot for your help.

There was no obvious nice way to disable it so I just commented a line out in the htmlarea.js and it fixed it.

I'm not sure why this line is needed.

Thanks Again

Offline

#4 2005-05-05 12:07:39

JAC
Xinha Community Member
Registered: 2005-03-16
Posts: 11

Re: Urls change from absoloute to relative

I've been having the same problem, both with images and long links (when the start of the link is the same as the base URL).

I had a look through the code and thought I'd found the problem:

//    f_href   : HTMLArea.is_ie ? editor.stripBaseURL(link.href) : link.getAttribute("href"),
      f_href   : link.getAttribute("href"),

//  f_url    : HTMLArea.is_ie ? editor.stripBaseURL(image.src) : image.getAttribute("src"),
    f_url    : image.getAttribute("src"),

But now on IE, I get the base URL being duplicated...

and I think it's stopped working in Firefox...

VERY CONFUSED!

All help extremely welcome.

Last edited by JAC (2005-05-05 12:08:00)

Offline

#5 2006-11-07 14:35:26

ekitel
New member
Registered: 2006-11-07
Posts: 1

Re: Urls change from absoloute to relative

I'm trying to figure this out also, with no luck, I even tried deleting the whole HTMLArea.prototype._insertImage function from htmlara.js but then insert image still works as usual, so I don't think commenting out any code inside the function will do anything either

BTW I'm using Xinha as a module with Drupal 4.7

thanks in advance!

Offline

#6 2006-11-08 12:38:38

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Urls change from absoloute to relative

Please specify your problem a bit more precisely

Offline

Board footer

Powered by FluxBB