Closed Bug 80081 Opened 25 years ago Closed 24 years ago

HTML serializer doesn't use the base uri for generating absolute url's

Categories

(Core :: DOM: Serializers, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: jst, Assigned: t_mutreja)

Details

(Whiteboard: [serializer][correctness][patch needs sr=])

Attachments

(1 file)

If nsIDocumentEncoder::OutputAbsoluteLinks is set in the HTML serializer it'll output absolute URL's and in generating those the serializer uses the document url as the base for generating the absolute URL's, this is not always correct. If the document has a base tag, the value of the base tag's href attribute should be used as the base, the base is available on the document object through nsIDocument::GetBaseURL().
moving to 1.0
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Status: NEW → ASSIGNED
Whiteboard: [serializer][correctness]
--> kin
Assignee: anthonyd → kin
Status: ASSIGNED → NEW
--> DOM to Text Conversion default owner
Assignee: kin → harishd
Component: Editor: Core → DOM to Text Conversion
Priority: P3 → --
Target Milestone: mozilla1.0 → ---
--> peterv. Our new serializer guru.
Assignee: harishd → peterv
Priority: -- → P3
Target Milestone: --- → mozilla1.2
--> myself.
Assignee: peterv → tmutreja
r=akkana on the patch. Aside: I wonder what we do for the case where we're serializing from a parser stream rather than a document? Do we do the right thing? Perhaps the case of parser stream to html serializer never happens in the real world (perhaps we only serialize to text from parser inputs?)
Whiteboard: [serializer][correctness] → [serializer][correctness][patch needs sr=]
Comment on attachment 67636 [details] [diff] [review] Diff for the fix... Um, I didn't think there could be cases where a document has a document URI, but no base URI. Maybe I'm wrong, and if this fixes real problems it's fine with me. sr=jst
Attachment #67636 - Flags: superreview+
Attachment #67636 - Flags: review+
Fixed with checkin C:\mozilla\content\base\src>cvs commit nsHTMLContentSerializer.cpp Checking in nsHTMLContentSerializer.cpp; /cvsroot/mozilla/content/base/src/nsHTMLContentSerializer.cpp,v <-- nsHTMLCont entSerializer.cpp new revision: 1.36; previous revision: 1.35 done
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter: please verify and mark verified-fixed...thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: