Opened 15 years ago

Closed 3 years ago

#759 closed defect (inactive)

Solution for stripBaseURL remplacement

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


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 :



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 :

Change History (7)

comment:1 Changed 14 years ago by gogo

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

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

comment:2 Changed 14 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

comment:3 Changed 13 years ago by ray

  • Milestone set to 0.96
  • Resolution duplicate deleted
  • Status changed from closed to reopened

comment:4 Changed 13 years ago by ray

comment:5 Changed 13 years ago by guest

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

-- Jorrit Schippers (jorrit []

comment:6 Changed 12 years ago by nicholasbs

  • Milestone changed from 0.96 to 0.97

comment:7 Changed 3 years ago by gogo

  • Resolution set to inactive
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.