Skip to main content

Bug Tracker

Side navigation

#5371 closed bug (invalid)

Opened October 14, 2009 10:55AM UTC

Closed October 15, 2009 12:43AM UTC

loaded base tag contaminates original document via load(url) in Firefox 3.5.3

Reported by: mimo Owned by:
Priority: major Milestone: 1.3.2
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

I'm using the following:

$("#placeholder").load("http://other.host/loaded/doc #source a"...)

When /loaded/doc contains <base href> it contaminates the document I'm doing this inclusion. This is observable when I do the following (after the load above)

$("#x").html( $("#y").html())

while #y looks as follows:

<div id="y">

<img src="/img/src" />

</div>

In such case firefox is not able to load the img in #x becouse it's baseURI is taken from the /loaded/doc.

The above construct works fine in IE, Opera, but when I examine the copied html, img has it's baseURI changed to the one loaded.

Attachments (0)
Change History (2)

Changed October 14, 2009 10:59AM UTC by mimo comment:1

just one more comment - both #x and #y are not contained in #placeholder - these are totally unrelated, but somehow the got contaminated by the baseURI when copied using html()

Changed October 15, 2009 12:43AM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

The loaded HTML fragment shouldn't have a

BASE
tag, because that tag is only valid in the
HEAD
of a document and you're not inserting content there.

http://www.w3.org/TR/html401/struct/links.html#h-12.4