Re: Quoting problem

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi Tom:

Yup this is a result of a patch I did to fix the deprecation of
cgi.escape. I didn't quite fix all the places where html.escape was
not a drop in replacement.

In message <DM6PR08MB477858C64DB8630CE11011B8CAC90@DM6PR08MB4778.namprd08.prod.
outlook.com>,
Tom Ekberg writes:
>I'm using TAL and am having a quoting problem that I didn't have, was
>it roundup 1.5? Here is a snippet of the TAL code:  
> [...] The HTML code that is generated with the near-tip roundup is:
>
><script language="javascript">
>var names = new Array();
>var ids = new Array();
>names[0] = &quot;- no selection -&quot;;
>names[1] = &quot;redacted (NPI#1407170467 PH#123-456-7890- FAX# 987-654-3210) Maggie Miller&quot;;
>
>In the old roundup it generates this HTML:
>
><script language="javascript">
>var names = new Array();
>var ids = new Array();
>names[0] = "- no selection -";
>names[1] = "redacted (NPI#1407170467 PH#123-456-7890- FAX# 987-654-3210) redacted";
>
>The TAL code is identical for both. Note that the latest roundup
>quotes the string, changing quotes to &quote;s.
>
>Is there a way with the new roundup to turn off the quoting and just
>have the raw text?

The quote mangling is fixed in any release after:

====
changeset:   5837:883c9e90b403
user:        John Rouillard <rouilj at iee.org>
date:        Sat Jul 06 13:12:58 2019 -0400
files:       roundup/anypy/html.py roundup/backends/sessions_dbm.py
  roundup/backends/sessions_rdbms.py roundup/cgi/PageTemplates/TALES.py
  roundup/cgi/TAL/TALGenerator.py roundup/cgi/TAL/TALInterpreter.py
  roundup/cgi/actions.py roundup/cgi/cgitb.py roundup/cgi/client.py
  roundup/cgi/exceptions.py roundup/cgi/templating.py
  roundup/cgi/wsgi_handler.py roundup/scripts/roundup_server.py

description:
Fix problem with cgi.escape being depricated a different way. This way
uses anypy and is cleaner. Also fixes incorrect/incomplete change that
resulted in escaped in TAL generated by TALInterpreter.py. The escaped
quotes break javascript etc. defined using tal string: values.

TODO: add test cases for TAL. This wouldn't have snuck through for a
month if we had good coverage of that library.
=====

For some reason 'escaped " in TAL' became 'escaped in TAL' but
you get the idea. Update to this release an you should be good.

If anybody would like to help get TAL testing implemented please do, I
can use the help.

Have a great day.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.