Ticket #759 (reopened defect)

Opened 3 years ago

Last modified 8 months ago

Solution for stripBaseURL remplacement

Reported by: bchenu@… Owned by: gogo
Priority: high Milestone: 0.96
Component: Xinha Core Version:
Severity: blocker Keywords: stripBaseURL getAttribute href relative absolute
Cc:

Description

I have a solution to submit about the problem on URL relative/absolute on Internet Explorer with the getAttribute method. The stripBaseURL method never works properly and parsing the url is not a good solution.

The getAttribute method has a second parameter on Internet Explorer (see link below). If we pass '2', the method return the exact value. And of course it works :)

The patch consists to replace :

editor.stripBaseURL(link.href)

by

link.getAttribute("href", 2)

I apply this patch on HTMLArea 2 years ago and it allways works (I try on Xinha and this works too). Generally, this solution must be used when the getAttribute is call on Internet Explorer.

Note that this patch will have to be applied on plugins too.

links : http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/getattribute.asp

Change History

Changed 3 years ago by gogo

  • status changed from new to closed
  • resolution set to duplicate

Hmmmm, the second attribute (as described in the msdn link) appears to not be part of the W3C spec, and the gecko spec doesn't have it either. I have a vague recollection that gecko also has a bit of a problem with making links absolute, but this could at least solve the problem for IE.

Duping this to #295

Changed 2 years ago by ray

In my experience this problem (the insertation of the server to a semi-absolute url) is also in Mozilla, so IMHO a IE-only solution is not a optimal way to deal with it

Changed 10 months ago by ray

  • status changed from closed to reopened
  • resolution deleted
  • milestone set to 0.96

Changed 10 months ago by ray

Changed 8 months ago by guest

In GetHTML/DOMwalk.js I also replaced value = editor.stripBaseURL(value); by value = root.getAttribute(name, 2); otherwise all links get changed on submit.

-- Jorrit Schippers (jorrit [] ncode.nl

Note: See TracTickets for help on using tickets.