Closed Bug 325404 Opened 19 years ago Closed 19 years ago

Get rid of _base_href and _base_target attributes

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

Details

Attachments

(2 files, 2 obsolete files)

We should use properties rather then attributes for this. Patch coming up.
Attached patch Patch to fix (obsolete) — Splinter Review
I'm not sure we really need the security check, but i'd rather not remove it in this patch. I made cloning work since it wasn't a whole lot of work.
Attachment #210315 - Flags: superreview?(jst)
Attachment #210315 - Flags: review?(jst)
Comment on attachment 210315 [details] [diff] [review] Patch to fix Looks good, r+sr=jst
Attachment #210315 - Flags: superreview?(jst)
Attachment #210315 - Flags: superreview+
Attachment #210315 - Flags: review?(jst)
Attachment #210315 - Flags: review+
+ if (HasProperties() && (prop = GetProperty(nsHTMLAtoms::htmlBaseHref))) { + NS_STATIC_CAST(nsIAtom*, prop)->ToString(aBaseTarget); not htmlBaseTarget? nsHTMLFragmentContentSink::ProcessBaseTag(nsIContent* aContent) { nsAutoString value; if (aContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::href, value)) { - mBaseHREF = value; + nsCOMPtr<nsIURI> baseHrefURI; + nsresult rv = NS_NewURI(getter_AddRefs(baseHrefURI), value, nsnull); shouldn't this pass the document's charset and URI too?
Attachment #210315 - Attachment is obsolete: true
Attachment #210380 - Flags: superreview?(jst)
Attachment #210380 - Flags: review?(jst)
Attached file Updated testcase
Thanks for those findings. I've updated the testcase to make sure target works as it should too.
Attachment #210316 - Attachment is obsolete: true
> shouldn't this pass the document's charset and URI too? what about the URI part? or are relative base uris not something that's supposed to work?
ah, ok. so it differs from xml:base.
Comment on attachment 210380 [details] [diff] [review] Fix comments from biesi r+sr=jst
Attachment #210380 - Flags: superreview?(jst)
Attachment #210380 - Flags: superreview+
Attachment #210380 - Flags: review?(jst)
Attachment #210380 - Flags: review+
Checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
In HTML 5 it currently has to be resolved: <http://whatwg.org/specs/web-apps/current-work/#the-base>
Note that HTML5, mostly following the precedent set by IE7, makes <base href> and <base target> only work based on the first <base> element. I did some studies and it seemed to me that the only sites this affected were automatically generated spammy link aggregators, so I doubt this will break any actually used pages.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: