Commit 92130c5a authored by TAKAHASHI Tamotsu's avatar TAKAHASHI Tamotsu

Make IDN decoding optional.

parent 35bf67aa
......@@ -2712,6 +2712,15 @@ struct option_t MuttVars[] = {
** generated unless the user explicitly sets one using the ``$my_hdr''
** command.
*/
#ifdef HAVE_LIBIDN
{ "use_idn", DT_BOOL, R_BOTH, OPTUSEIDN, 1},
/*
** .pp
** When \fIset\fP, Mutt will show you international domain names decoded.
** Note: You can use IDNs for addresses even if this is \fIunset\fP.
** This variable only affects decoding.
*/
#endif /* HAVE_LIBIDN */
#ifdef HAVE_GETADDRINFO
{ "use_ipv6", DT_BOOL, R_NONE, OPTUSEIPV6, 1},
/*
......
......@@ -430,6 +430,9 @@ enum
OPTUSEDOMAIN,
OPTUSEFROM,
OPTUSEGPGAGENT,
#ifdef HAVE_LIBIDN
OPTUSEIDN,
#endif
#ifdef HAVE_GETADDRINFO
OPTUSEIPV6,
#endif
......
......@@ -46,6 +46,9 @@ int mutt_idna_to_local (const char *in, char **out, int flags)
{
*out = NULL;
if (!option (OPTUSEIDN))
goto notrans;
if (!in)
goto notrans;
......@@ -57,7 +60,8 @@ int mutt_idna_to_local (const char *in, char **out, int flags)
/*
* make sure that we can convert back and come out with the same
* domain name. */
* domain name.
*/
if ((flags & MI_MAY_BE_IRREVERSIBLE) == 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment