CLIFFORD ILKAY [mailto:[EMAIL PROTECTED] wrote:
>
> from WebKit.Page import Page
> class HelloXUL(Page):

[...]

> I have added "application/vnd.mozilla.xul+xml" to mimetypes.py. As you
can
> see, I had to override many methods to prevent HTML from being
injected
> into the generated page.

Surely the Page class isn't really suitable for generating anything
other than HTML unless you override various methods. I had a brief look
at that class the other day for other reasons, and noted that it has a
fairly specific purpose that wouldn't suit certain kinds of applications
without modification or lots of method overriding.
 
Firstly, I'd recommend setting the "content-type" header to the value
stated above, since I imagine that Mozilla uses that special header
value in its decision about how to present the content. Then, I'd want
to ensure that the XML being generated is well-formed and has the
necessary document type declaration if Mozilla expects it (the usual
DOCTYPE stuff after the <?xml ...?> line). Finally, I'd look out for
things in the generated XUL that might make the document invalid - ie.
HTML stuff which the Page class's methods might still be slipping in as
it handles the request.

Good luck and let us know how you get on!

Paul



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to