PM-757: Go back to URL quoted strings

It turns out that the original problem was caused by a unicode
string being passed to the quote fuction. Such unicode strings need to
be UTF-8 encoded before they are passed to the quote function because
they contain values > 256. URL quoting will work better than XML entity
references when the input string is a byte string that is encoded with
something other than UTF-8, such as Latin-1 or Windows-1252. This new
approach will allow such strings to pass through quote and unquote without
being mangled in the process.
Merge branch '4.3'