Problem with PythonScript and embedded HTML
Try this in a PythonScript: print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will appear outside the edit box</H2>""" Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted? Regards, Phil +----------------------------------+ | Phil Mayers, Network Support | | Centre for Computing Services | | Imperial College | +----------------------------------+
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will appear outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S Collector it is it hasn't in 2.3.1 final. cheers, Chris
Indeed, works for me under a the latest 2.3 branch... ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 8:36 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will
appear
outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S
Collector it is it hasn't in 2.3.1 final.
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
No it cannot work for you either ! :-))) But it's because I'd forgotten to say it was on the "edit" tab... Well, the solution is there : Here is the diff for $ZOPE/lib/python/OFS/dtml/documentEdit.dtml : 20c20 < title><dtml-var title html_quote></dtml-if>"> ---
title><dtml-var title></dtml-if>">
Once again, such a bug is really a shame...... :-( Please can you apply this patch on the CVS at least ? Many thanks, P.-J. Chris McDonough wrote:
Indeed, works for me under a the latest 2.3 branch...
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 8:36 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will
appear
outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S
Collector it is it hasn't in 2.3.1 final.
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- If the only tool you have is a hammer, you tend to see every problem as a nail. Si la unica herramita te tienes es un martillo, tendras tendancia a ver cada problema como un clavo. Wenn Ihnen als einziges Werkzeug ein Hammer zur Verfügung steht, neigen Sie dazu, jedes Problem als Nagel zu betrachten. Si le seul outil dont vous disposez est un marteau, vous avez tendance à voir chaque problème comme un clou. --Abraham Maslow
How does html-quoting the title fix the reported bug? I'm confused. ----- Original Message ----- From: "Pierre-Julien Grizel" <grizel@mouli.net> To: "Chris McDonough" <chrism@digicool.com>; "Zope mailing list" <zope@zope.org> Sent: Friday, April 06, 2001 9:51 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML No it cannot work for you either ! :-))) But it's because I'd forgotten to say it was on the "edit" tab... Well, the solution is there : Here is the diff for $ZOPE/lib/python/OFS/dtml/documentEdit.dtml : 20c20 < title><dtml-var title html_quote></dtml-if>"> ---
title><dtml-var title></dtml-if>">
Once again, such a bug is really a shame...... :-( Please can you apply this patch on the CVS at least ? Many thanks, P.-J. Chris McDonough wrote:
Indeed, works for me under a the latest 2.3 branch...
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 8:36 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will
appear
outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S
Collector it is it hasn't in 2.3.1 final.
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- If the only tool you have is a hammer, you tend to see every problem as a nail. Si la unica herramita te tienes es un martillo, tendras tendancia a ver cada problema como un clavo. Wenn Ihnen als einziges Werkzeug ein Hammer zur Verfügung steht, neigen Sie dazu, jedes Problem als Nagel zu betrachten. Si le seul outil dont vous disposez est un marteau, vous avez tendance à voir chaque problème comme un clou. --Abraham Maslow
(Just a little note : the patch I've just posted was for the DTML Document bug I noticed, not the PythonScript bug Philip noticed... gloups... But, em, a bug is a bug ! :-) ) All apologies... P.-J. Chris McDonough wrote:
Indeed, works for me under a the latest 2.3 branch...
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 8:36 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will
appear
outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S
Collector it is it hasn't in 2.3.1 final.
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- If the only tool you have is a hammer, you tend to see every problem as a nail. Si la unica herramita te tienes es un martillo, tendras tendancia a ver cada problema como un clavo. Wenn Ihnen als einziges Werkzeug ein Hammer zur Verfügung steht, neigen Sie dazu, jedes Problem als Nagel zu betrachten. Si le seul outil dont vous disposez est un marteau, vous avez tendance à voir chaque problème comme un clou. --Abraham Maslow
What bug are we fixing? I'm lost. ----- Original Message ----- From: "Pierre-Julien Grizel" <grizel@mouli.net> To: "Chris McDonough" <chrism@digicool.com>; "Zope mailing list" <zope@zope.org> Sent: Friday, April 06, 2001 9:53 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML (Just a little note : the patch I've just posted was for the DTML Document bug I noticed, not the PythonScript bug Philip noticed... gloups... But, em, a bug is a bug ! :-) ) All apologies... P.-J. Chris McDonough wrote:
Indeed, works for me under a the latest 2.3 branch...
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 8:36 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will
appear
outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S
Collector it is it hasn't in 2.3.1 final.
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- If the only tool you have is a hammer, you tend to see every problem as a nail. Si la unica herramita te tienes es un martillo, tendras tendancia a ver cada problema como un clavo. Wenn Ihnen als einziges Werkzeug ein Hammer zur Verfügung steht, neigen Sie dazu, jedes Problem als Nagel zu betrachten. Si le seul outil dont vous disposez est un marteau, vous avez tendance à voir chaque problème comme un clou. --Abraham Maslow _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Oups... Ok, let me explain. Here is the copy of my bug request : """ If I type for example "<" in the title property of a DTML Document, it is showed as "<" when I valid the edit form. If I do the same with a Folder, it is rendered as "<", which is the normal and safe behaviour (and is the behaviour of 1.2.x versions). BTW, the Properties form of the DTML Document behaves correctly as well. """ So it lacked an html_quote id editDocument.dtml - that's all ! :-) Hope this is clearer now ! :-) P.-J. Chris McDonough wrote:
What bug are we fixing? I'm lost.
----- Original Message ----- From: "Pierre-Julien Grizel" <grizel@mouli.net> To: "Chris McDonough" <chrism@digicool.com>; "Zope mailing list" <zope@zope.org> Sent: Friday, April 06, 2001 9:53 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
(Just a little note : the patch I've just posted was for the DTML Document bug I noticed, not the PythonScript bug Philip noticed... gloups... But, em, a bug is a bug ! :-) )
All apologies...
P.-J.
Chris McDonough wrote:
Indeed, works for me under a the latest 2.3 branch...
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 8:36 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will
appear
outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S
Collector it is it hasn't in 2.3.1 final.
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- If the only tool you have is a hammer, you tend to see every problem as a nail. Si la unica herramita te tienes es un martillo, tendras tendancia a ver cada problema como un clavo. Wenn Ihnen als einziges Werkzeug ein Hammer zur Verfügung steht, neigen Sie dazu, jedes Problem als Nagel zu betrachten. Si le seul outil dont vous disposez est un marteau, vous avez tendance à voir chaque problème comme un clou. --Abraham Maslow
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- If the only tool you have is a hammer, you tend to see every problem as a nail. Si la unica herramita te tienes es un martillo, tendras tendancia a ver cada problema como un clavo. Wenn Ihnen als einziges Werkzeug ein Hammer zur Verfügung steht, neigen Sie dazu, jedes Problem als Nagel zu betrachten. Si le seul outil dont vous disposez est un marteau, vous avez tendance à voir chaque problème comme un clou. --Abraham Maslow
Ah ok, gotcha.. thanks!! - C ----- Original Message ----- From: "Pierre-Julien Grizel" <grizel@mouli.net> To: "Chris McDonough" <chrism@digicool.com>; "Zope mailing list" <zope@zope.org> Sent: Friday, April 06, 2001 10:00 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML Oups... Ok, let me explain. Here is the copy of my bug request : """ If I type for example "<" in the title property of a DTML Document, it is showed as "<" when I valid the edit form. If I do the same with a Folder, it is rendered as "<", which is the normal and safe behaviour (and is the behaviour of 1.2.x versions). BTW, the Properties form of the DTML Document behaves correctly as well. """ So it lacked an html_quote id editDocument.dtml - that's all ! :-) Hope this is clearer now ! :-) P.-J.
Quite normal ! : This bug is corrected since 2.3.1b1 ;) (I read it in CHANGES.TXT) my 0.0002$... Olivier ----- Original Message ----- From: "Chris McDonough" <chrism@digicool.com> To: "Chris Withers" <chrisw@nipltd.com>; "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 3:30 PM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
Indeed, works for me under a the latest 2.3 branch...
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Mayers, Philip J" <p.mayers@ic.ac.uk> Cc: <zope@zope.org> Sent: Friday, April 06, 2001 8:36 AM Subject: Re: [Zope] Problem with PythonScript and embedded HTML
"Mayers, Philip J" wrote:
Try this in a PythonScript:
print """<TEXTAREA NAME="whatever">%s</TEXTAREA><H2>This text will
appear
outside the edit box</H2>"""
Hit the save-changes and watch the sparks fly. I guess the contents of the *real* edit textarea should be HTML-quoted?
I'm sure I saw CVS notifications saying this ahd been fixed :-S
Collector it is it hasn't in 2.3.1 final.
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Chris McDonough -
Chris Withers -
Mayers, Philip J -
Olivier Deckmyn -
Pierre-Julien Grizel