Closed Bug 76671 Opened 23 years ago Closed 23 years ago

Rejecting sgml mimetypes at view source

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
trivial

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: sbanu, Assigned: harishd)

References

Details

(Whiteboard: [fix in hand])

Attachments

(2 files)

There is for sure that sgml mimetype is supported if someone had clicked view 
source on it. It cannot ask for source on an unloaded document.
Thats why I am asking you to check in this one-line patch that allows others 
developers to use your view-source components. In this case, this is about 
DocZilla that supports SGML files.

Thanx!
sorinb
Marking NEW so the patch will get looked at...adding cc: bz because hes been
working on View Source lately.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch, review
Sorin, thanks for the patch.  A nitpick.  Please look at the way the other MIME
types are handled.  You probably want to define kSGMLContentType in the same way
and use it in the EqualsWithConversion. (See
http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsIParser.h#353 in
particular.)

Do you have a link to a text/sgml file that this could be tested on?
This is the new patch including the kSGMLTextContentType defining in 
nsIParser.h. In network/mime/public/nsMimeTypes.h file there are defined this 
types again, and I had it defined there first.
About a sgml file that this could be tested on, I could give you one, but 
Mozilla doesnt support SGML files... so you cannot reach to that point where 
you can view source. DocZilla can view them, but you have only the release 
version. Anyway... this patch it is not some big deal and i can ensure you it 
works.

sorinb
Looks good to me, and looks like it should do the right thing...  reviews?
adding dependency on the bug about showing source for generic text/* files.
Depends on: 77337
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
But can't it be patched with this patch for m 0.9? Nobody knows when m 1.0 will 
be out and till then will be released a new version of DocZilla, for example, 
based on 0.9... and we will have to modify this in Mozilla in order to have the 
view-source and make gkparser.dll DocZilla specific, for one single modified 
line.
I understood the dependency on bug 77337, but until 1.0 it can be added this 
patch in order to have view-source for sgml.
Thanx in advance!
May be we can shoot this for m0.9.1.
Target Milestone: mozilla1.0 → mozilla0.9.1
The patch looks good. r=harishd
Whiteboard: [fix in hand]
sr=jst
This was checked in earlier today. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Marking verified as per above developer comments. 
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: