diff --git a/src/main/display.cc b/src/main/display.cc
index 492eb7929..dc3edc8b6 100644
--- a/src/main/display.cc
+++ b/src/main/display.cc
@@ -289,8 +289,12 @@ ClearImages(gchar *text)
}
//
-// utility function to blank `' content from text.
+// utility function to blank font names `' in text.
//
+
+#define CLEAR_FONT_NAME " specs:
// is never followed by another before .
- for (s = strstr(text, "'))) {
- while (s <= t)
- *(s++) = ' ';
- s = strstr(s, "");
- t = s + 6;
- while (s <= t)
- *(s++) = ' ';
+ s += CLEAR_FONT_NAME_LENGTH;
+ if ((t = strchr(s, '"'))) {
+ while (s < t)
+ *(s++) = '.';
} else {
- XI_message(("ClearFontFaces: no font end: %s\n", s));
+ XI_message(("ClearFontFaces: no closing double quote: %s\n", s));
return;
}
}
@@ -674,7 +675,7 @@ CleanupContent(GString *text,
if (ops->respect_font_faces == 0)
ClearFontFaces((gchar *)text->str);
else if ((ops->respect_font_faces == -1) && // "unknown"
- (strcasestr(text->str, "str, "respect_font_faces = 1; // now known.
main_save_module_options(name, "Respect Font Faces", 1);
}