Changeset 1374:50299dadf2e0 for alias.c
Legend:
- Unmodified
- Added
- Removed
-
alias.c
r1283 r1374 129 129 } 130 130 131 /* if someone has an address like 131 /* 132 * if someone has an address like 132 133 * From: Michael `/bin/rm -f ~` Elkins <me@cs.hmc.edu> 133 134 * and the user creates an alias for this, Mutt could wind up executing … … 141 142 * alias me Michael \\`/bin/rm -f ~\\` Elkins <me@cs.hmc.edu> 142 143 * which still gets evaluated because the double backslash is not a quote. 144 * 145 * Additionally, we need to quote ' and " characters - otherwise, mutt will 146 * interpret them on the wrong parsing step. 147 * 148 * $ wants to be quoted since it may indicate the start of an environment 149 * variable. 143 150 */ 151 144 152 static void write_safe_address (FILE *fp, char *s) 145 153 { 146 154 while (*s) 147 155 { 148 if (*s == '\\' || *s == '`') 156 if (*s == '\\' || *s == '`' || *s == '\'' || *s == '"' 157 || *s == '$') 149 158 fputc ('\\', fp); 150 159 fputc (*s, fp);
