mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 08:50:11 +01:00
commented out decodeURL(), and minor code clean up
This commit is contained in:
parent
b6228ce8a3
commit
a4be8eef0d
@ -419,6 +419,7 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int
|
||||
}
|
||||
|
||||
|
||||
/* remove all HTML tags */
|
||||
if(state->texthtml == 1 && state->message_state == MSG_BODY) markHTML(buf, state);
|
||||
|
||||
if(state->message_state == MSG_BODY && state->qp == 1){
|
||||
@ -426,7 +427,8 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int
|
||||
decodeQP(buf);
|
||||
}
|
||||
|
||||
decodeURL(buf);
|
||||
/* I believe that we can live without this function call */
|
||||
//decodeURL(buf);
|
||||
|
||||
if(state->texthtml == 1) decodeHTML(buf);
|
||||
|
||||
|
@ -306,9 +306,7 @@ void fixupSoftBreakInQuotedPritableLine(char *buf, struct _state *state){
|
||||
if(p){
|
||||
memset(state->qpbuf, 0, MAX_TOKEN_LEN);
|
||||
if(strlen(p) < MAX_TOKEN_LEN-1){
|
||||
//snprintf(state->qpbuf, MAX_TOKEN_LEN-1, "%s", p);
|
||||
memcpy(&(state->qpbuf[0]), p, MAX_TOKEN_LEN-1);
|
||||
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
@ -334,9 +332,7 @@ void fixupBase64EncodedLine(char *buf, struct _state *state){
|
||||
if(buf[strlen(buf)-1] != '\n'){
|
||||
p = strrchr(buf, ' ');
|
||||
if(p){
|
||||
//strncpy(state->miscbuf, p+1, MAX_TOKEN_LEN-1);
|
||||
memcpy(&(state->miscbuf[0]), p+1, MAX_TOKEN_LEN-1);
|
||||
|
||||
*p = '\0';
|
||||
}
|
||||
}
|
||||
@ -478,17 +474,10 @@ void translateLine(unsigned char *p, struct _state *state){
|
||||
if(strncasecmp((char *)p, "http://", 7) == 0){ p += 7; url = 1; continue; }
|
||||
if(strncasecmp((char *)p, "https://", 8) == 0){ p += 8; url = 1; continue; }
|
||||
|
||||
if(url == 1 && (*p == '.' || *p == '-' || *p == '_' || *p == '/' || isalnum(*p)) ) continue;
|
||||
if(url == 1 && (*p == '.' || *p == '-' || *p == '_' || *p == '/' || *p == '%' || *p == '?' || isalnum(*p)) ) continue;
|
||||
if(url == 1) url = 0;
|
||||
}
|
||||
|
||||
if(state->texthtml == 1 && state->message_state == MSG_BODY && strncmp((char *)p, "HTML*", 5) == 0){
|
||||
p += 5;
|
||||
while(isspace(*p) == 0){
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
if(delimiter_characters[(unsigned int)*p] != ' ') *p = ' ';
|
||||
/* we MUSTN'T convert it to lowercase in the 'else' case, because it breaks utf-8 encoding! */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user