Re: Quoting problem
Tom Ekberg <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <DM6PR08MB4778770BE2DC4CB647226158CACB0@DM6PR08MB4778.namprd08.prod.outlook.com> |
John, That was it! I was a little behind in updates - 44. The one you mentioned was one of them. Now the javascript code looks good, and works too. Thank you. Tom Ekberg Senior Computer Specialist, Lab Medicine 4th Floor, Pat Steel Building Department of Laboratory Medicine Work: (206) 520-4856 Email: [email protected] ________________________________ From: [email protected] <[email protected]> on behalf of John P. Rouillard <[email protected]> Sent: Wednesday, July 17, 2019 5:33 PM To: Tom Ekberg Cc: [email protected] Subject: Re: [Roundup-users] Quoting problem 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] = "- no selection -"; >names[1] = "redacted (NPI#1407170467 PH#123-456-7890- FAX# 987-654-3210) Maggie Miller"; > >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 "e;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. _______________________________________________ Roundup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/roundup-users