(s, safe)
| 4598 | # errors, say for example an umlaut in the username even though |
| 4599 | # the path *is* already quoted. |
| 4600 | def quote(s, safe): |
| 4601 | s = s or '' |
| 4602 | # Triggers on non-ascii characters - another option would be: |
| 4603 | # _urllib.parse.quote(s.replace('%', '')) != s.replace('%', '') |
| 4604 | # which would trigger on all %-characters, e.g. "&". |
| 4605 | if getUnicode(s).encode("ascii", "replace") != s or forceQuote: |
| 4606 | s = _urllib.parse.quote(getBytes(s), safe=safe) |
| 4607 | return s |
| 4608 | |
| 4609 | username = quote(parts.username, '') |
| 4610 | password = quote(parts.password, safe='') |
no test coverage detected
searching dependent graphs…