Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101604
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Data Entry |
| Date | 2016-01-13 22:29 +1100 |
| Message-ID | <mailman.98.1452684579.13488.python-list@python.org> (permalink) |
| References | <6ea58259-05f8-40b5-8c85-46a69668c8e6@googlegroups.com> <CAPTjJmqjLf=1ZguFgxxxRQwf2jYXoQerS=avd5z_ENEOUM_XEw@mail.gmail.com> <n75bvn$thu$1@ger.gmane.org> |
On Wed, Jan 13, 2016 at 10:21 PM, Peter Otten <__peter__@web.de> wrote: >> To set a multi-word value as an HTML attribute, you'll need to put >> quotes around it. You might be able to get away with using %r instead >> of %s, or even just "%s", > > That is bad advice that "works" until there is a value containing > quotes or other markup. > Which is why I said "get away with". If you know your data, you might know that it can have spaces but never quotes, for instance. But proper escaping is definitely the way to go. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Data Entry tdsperth@gmail.com - 2016-01-12 17:52 -0800 Re: Data Entry Chris Angelico <rosuav@gmail.com> - 2016-01-13 13:01 +1100 Re: Data Entry tdsperth@gmail.com - 2016-01-12 18:58 -0800 Re: Data Entry Peter Otten <__peter__@web.de> - 2016-01-13 12:21 +0100 Re: Data Entry Chris Angelico <rosuav@gmail.com> - 2016-01-13 22:29 +1100
csiph-web