From: Robert Luberda <robert@debian.org>
Date: Tue, 17 Apr 2007 20:48:31 +0200
Subject: 023 man2html double quotes

Properly decode double quotes inside the quoted text (closes: #406098).
---
 man2html/man2html.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/man2html/man2html.c b/man2html/man2html.c
index 9d6d347..6396fff 100644
--- a/man2html/man2html.c
+++ b/man2html/man2html.c
@@ -1307,7 +1307,7 @@ trans_char(char *c, char s, char t) {
  */
 static char *
 fill_words(char *str, char *words[], int maxn, int *n, char eow) {
-	char *s = str;
+	char *s = str, *t;
 	int backslash = 0;
 	int skipspace = 0;	/* 1 if space is not end-of-word */
 
@@ -1316,8 +1316,15 @@ fill_words(char *str, char *words[], int maxn, int *n, char eow) {
 	while (*s && (*s != '\n' || backslash)) {
 		if (!backslash) {
 			if (*s == '"') {
-				*s = '\a';
-				skipspace = !skipspace;
+				if (skipspace && *(s+1) == '"') { 
+				/* "" inside the quoted text means " */
+					for (t = s++; t > words[*n]; t--)
+						*t = *(t-1);
+					words[*n]++;							
+				} else {	
+					*s = '\a';
+					skipspace = !skipspace;
+				}					
 			} else if (*s == escapesym) {
 				backslash = 1;
 			} else if ((*s == ' ' || *s == '\t') && !skipspace) {
