Opened 14 years ago

Closed 14 years ago

#81 closed defect (duplicate)

Image links getting mangled?

Reported by: dhscompguy Owned by: gogo
Priority: low Milestone: Version 1.0
Component: Xinha Core Version: trunk
Severity: minor Keywords: broken, image, link
Cc:

Description

I'm inserting this image --

<img hspace="0" src="http://localhost/ibcms/serve.php/7/" align="baseline" border="0" />

When I switch back and forth from HTML mode to WYSIWYG mode, the link is changed to

http://localhost/serve.php/7/

and sometimes even

serve.php/7/

The same also happens to other links, but I'm noticing it mostly happens with images.

Change History (9)

comment:1 Changed 14 years ago by dhscompguy

File: htmlarea.js
Line: 4046

if (HTMLArea.is_ie && (name == "href" || name == "src")) {
    value = editor.stripBaseURL(value);
}

Why strip the BaseURL?

I commented this line out and my problem disappeared in IE (not sure about Firefox yet).

comment:2 Changed 14 years ago by dhscompguy

Seems to work fine in my version of Firefox too.

Any idea what this line is there for?

comment:3 Changed 14 years ago by anonymous

You could overwrite the editor.stripBaseURL function to just return value, this can be done from the file calling the xinha editor, this way you wouldn't need to fix the xinha code in consecutive releases.

comment:4 Changed 14 years ago by gogo

If you create a relative link in IE, it will make it absolute by inserting the host name. Thus we have to strip out the hostname.

comment:5 Changed 14 years ago by gogo

That said, URL stripping probably needs looking at, cleaning up, and commenting as to the specific behaviours of Gecko and IE - as each I believe has certain strange behaviour when it comes to relative and server-root-absolute URls.

comment:6 Changed 14 years ago by gogo

  • Milestone set to Version 1.0
  • Version set to trunk

comment:7 Changed 14 years ago by gogo

  • Severity changed from major to minor

comment:8 Changed 14 years ago by gogo

  • Priority changed from normal to low

comment:9 Changed 14 years ago by gogo

  • Resolution set to duplicate
  • Status changed from new to closed

Closing this one in favor of #295 which we'll use to track the investigations into link behaviours.

Note: See TracTickets for help on using tickets.