Opened 8 years ago

Last modified 6 years ago

#759 reopened defect

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
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 (6)

comment:1 Changed 8 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 8 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 7 years ago by ray

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

comment:4 Changed 7 years ago by ray

comment:5 Changed 7 years 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

comment:6 Changed 6 years ago by nicholasbs

  • Milestone changed from 0.96 to 0.97
Note: See TracTickets for help on using tickets.