durusmail: quixote-users: urllib.quote() and cgi.escape()
urllib.quote() change in 2.4.2
2006-01-16
2006-01-17
2006-01-17
2006-01-17
urllib.quote() and cgi.escape()
2006-01-17
2006-01-19
2006-01-20
2006-01-20
2006-01-23
2006-01-24
2006-01-26
2006-01-26
2006-01-27
2006-01-17
urllib.quote() and cgi.escape()
Titus Brown
2006-01-24
On Mon, Jan 23, 2006 at 10:15:43AM +0100, Thomas Guettler wrote:
-> Am Freitag, 20. Januar 2006 14:54 schrieb Graham Fawcett:
-> > Titus Brown wrote:
-> >     "By default, SGML requires that all attribute values be delimited
-> >     using either double quotation marks (ASCII decimal 34) or single
-> >     quotation marks (ASCII decimal 39).
-> [cut]
-> > Don't have a ref at hand, but I am certain it's valid in XML as well.
->
-> Yes, XML allows single and double quotation marks:
->
-> AttValue        ::=          '"' ([^<&"] | Reference)* '"'
->                      |  "'" ([^<&'] | Reference)* "'"
->
-> https://www.w3.org/TR/2004/REC-xml-20040204/#NT-AttValue

(I didn't actually write that, but ok ;)

So, should htmlescape deal with this differently?

right now it does this:

>>> print str(htmlescape("'"))
'
>>> print str(htmlescape('"'))
"

--titus
reply