No description
formataddr[1] by default encodes non-ascii characters to `=?utf-8?q`, which needs to be decoded to a human-readable string format. using decode_header and make_header we can decode the string back to human-readable format.
before:
In [1]: formataddr(("Tèst", "notifications@erpnext.com"))
Out[1]: '=?utf-8?b?VMOoc3Q=?= <notifications@erpnext.com>'
after:
In [2]: make_header(decode_header(formataddr(("Tèst", "notifications@erpnext.com"))))
Out[2]: 'Tèst <notifications@erpnext.com>'
references:
[1]: https://docs.python.org/3/library/email.utils.html#email.utils.formataddr
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
|
||
|---|---|---|
| .github | ||
| .travis | ||
| ci | ||
| cypress | ||
| frappe | ||
| rollup | ||
| .deepsource.toml | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .mergify.yml | ||
| .snyk | ||
| .travis.yml | ||
| attributions.md | ||
| bandit.yml | ||
| CODE_OF_CONDUCT.md | ||
| cypress.json | ||
| generate_bootstrap_theme.js | ||
| hooks.md | ||
| LICENSE | ||
| Makefile | ||
| node_utils.js | ||
| package.json | ||
| README.md | ||
| requirements.txt | ||
| SECURITY.md | ||
| setup.py | ||
| socketio.js | ||
| yarn.lock | ||
Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for ERPNext
Table of Contents
Installation
Contributing
Website
For details and documentation, see the website https://frappe.io
License
This repository has been released under the MIT License.