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)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: sicking, Assigned: sicking)
Details
Attachments
(2 files, 2 obsolete files)
3.55 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
814 bytes,
text/html
|
Details |
We should use properties rather then attributes for this. Patch coming up.
Assignee | ||
Comment 1•19 years ago
|
||
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 2•19 years ago
|
||
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+
Assignee | ||
Comment 3•19 years ago
|
||
Comment 4•19 years ago
|
||
+ 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?
Assignee | ||
Comment 5•19 years ago
|
||
Attachment #210315 -
Attachment is obsolete: true
Attachment #210380 -
Flags: superreview?(jst)
Attachment #210380 -
Flags: review?(jst)
Assignee | ||
Comment 6•19 years ago
|
||
Thanks for those findings. I've updated the testcase to make sure target works as it should too.
Attachment #210316 -
Attachment is obsolete: true
Comment 7•19 years ago
|
||
> 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?
Assignee | ||
Comment 8•19 years ago
|
||
Yes, the <base href> attribute is an absolute uri.
http://www.w3.org/TR/html4/struct/links.html#h-12.4
Comment 9•19 years ago
|
||
ah, ok. so it differs from xml:base.
Assignee | ||
Comment 10•19 years ago
|
||
yes
Comment 11•19 years ago
|
||
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+
Assignee | ||
Comment 12•19 years ago
|
||
Checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 13•19 years ago
|
||
In HTML 5 it currently has to be resolved:
<http://whatwg.org/specs/web-apps/current-work/#the-base>
Comment 14•17 years ago
|
||
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.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•