[evolution-patches] Escaping percentage signs in gtkhtml



Currently the code uses "\%" to write a percentage sign within a format
string - is this correct? Shouldn't "%%' be used instead?  The attached
patch should fix this.

Dave

? autom4te.cache
Index: src/htmlimage.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlimage.c,v
retrieving revision 1.198
diff -u -p -r1.198 htmlimage.c
--- src/htmlimage.c	3 May 2004 15:37:42 -0000	1.198
+++ src/htmlimage.c	4 May 2004 20:05:05 -0000
@@ -593,7 +593,7 @@ save (HTMLObject *self,
 		return FALSE;	
 
 	if (image->percent_width) {
-		if (!html_engine_save_output_string (state, " WIDTH=\"%d\%\"", image->specified_width))
+		if (!html_engine_save_output_string (state, " WIDTH=\"%d%%\"", image->specified_width))
 			return FALSE;
 	} else if (image->specified_width > 0) {
 		if (!html_engine_save_output_string (state, " WIDTH=\"%d\"", image->specified_width))
@@ -601,7 +601,7 @@ save (HTMLObject *self,
 	}
 
 	if (image->percent_height) {
-		if (!html_engine_save_output_string (state, " HEIGHT=\"%d\%\"", image->specified_height))
+		if (!html_engine_save_output_string (state, " HEIGHT=\"%d%%\"", image->specified_height))
 			return FALSE;
 	} else if (image->specified_height > 0) {
 		if (!html_engine_save_output_string (state, " HEIGHT=\"%d\"", image->specified_height))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]