git-svn: trunk@3678
Török Edvin authored on 2008/02/27 06:34:44... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Tue Feb 26 22:36:38 EET 2008 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * libclamav/htmlnorm.c: change ' to " inside scripts |
|
4 |
+ |
|
1 | 5 |
Tue Feb 26 17:51:50 CET 2008 (acab) |
2 | 6 |
----------------------------------- |
3 | 7 |
* libclamav/explode.c: fix possible uninit variable - thx TK |
... | ... |
@@ -672,7 +672,10 @@ static int cli_html_normalise(int fd, m_area_t *m_area, const char *dirname, tag |
672 | 672 |
next_state = HTML_NORM; |
673 | 673 |
ptr++; |
674 | 674 |
} else { |
675 |
- html_output_c(file_buff_o2, tolower(*ptr)); |
|
675 |
+ unsigned char c = tolower(*ptr); |
|
676 |
+ /* normalize ' to " for scripts */ |
|
677 |
+ if(in_script && c == '\'') c = '"'; |
|
678 |
+ html_output_c(file_buff_o2, c); |
|
676 | 679 |
if (!in_script) { |
677 | 680 |
if(*ptr < 0x20) { |
678 | 681 |
if(!text_space_written) { |
... | ... |
@@ -680,7 +683,7 @@ static int cli_html_normalise(int fd, m_area_t *m_area, const char *dirname, tag |
680 | 680 |
text_space_written = TRUE; |
681 | 681 |
} |
682 | 682 |
} else { |
683 |
- html_output_c(file_buff_text, tolower(*ptr)); |
|
683 |
+ html_output_c(file_buff_text, c); |
|
684 | 684 |
text_space_written = FALSE; |
685 | 685 |
} |
686 | 686 |
} |