Closed Bug 280470 Opened 20 years ago Closed 20 years ago

input type="image" .src, form.action properties don't resolve relative URIs (should be absolute)

Categories

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

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.8beta1

People

(Reporter: philor, Assigned: bzbarsky)

References

Details

Attachments

(3 files, 1 obsolete file)

The .src property for <img src="/foo.jpg"> returns http://example.com/foo.jpg,
but .src for <input type="image" src="/foo.jpg"> returns /foo.jpg. Since Page
Info just adds them both to the Media tab with elem.src, the <input>s are
broken, but I'm not sure if it's intentionally not resolved for input, and Page
Info should do its own resolving, or not.
Attached file testcase (obsolete) —
So.. in the DOM2 HTML spec, HTMLImageElement.src is defined to be a URI, but
HTMLInputElement.src is just a string (no mention of URI or [IETF RFC 2396] like
for other url properties.

jst, is that just an oversight in the spec?
Status: UNCONFIRMED → NEW
Ever confirmed: true
HTMLFormElement.action is also just a string, though everything else I could
think of, down to HTMLQuoteElement.cite, is a URI.
Sounds like oversights to me, I can't remember these specific properties being
discussed in the DOM WG.
Attached patch PatchSplinter Review
This is the right thing, I think.
Attachment #173705 - Flags: superreview?(jst)
Attachment #173705 - Flags: review?(jst)
*** Bug 281210 has been marked as a duplicate of this bug. ***
Comment on attachment 173705 [details] [diff] [review]
Patch

r+sr=jst
Attachment #173705 - Flags: superreview?(jst)
Attachment #173705 - Flags: superreview+
Attachment #173705 - Flags: review?(jst)
Attachment #173705 - Flags: review+
Fixed.
Assignee: general → bzbarsky
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.8beta1
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 294353 has been marked as a duplicate of this bug. ***
*** Bug 295587 has been marked as a duplicate of this bug. ***
Summary: input type="image" .src property doesn't resolve relative URIs → input type="image" .src, form.action properties don't resolve relative URIs (should be absolute)
Attachment #203834 - Attachment is patch: false
Attachment #203834 - Attachment mime type: text/plain → text/html
Marking verified per last attachment
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: