summaryrefslogtreecommitdiff
path: root/embed/mozilla/EphyPromptService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyPromptService.cpp')
-rw-r--r--embed/mozilla/EphyPromptService.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/embed/mozilla/EphyPromptService.cpp b/embed/mozilla/EphyPromptService.cpp
index 357029590..b68f94c4f 100644
--- a/embed/mozilla/EphyPromptService.cpp
+++ b/embed/mozilla/EphyPromptService.cpp
@@ -46,6 +46,7 @@
#include <glib-object.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <gtk/gtkversion.h>
#include "ephy-embed-shell.h"
#include "ephy-gui.h"
@@ -187,6 +188,10 @@ Prompter::Prompter (const char *aStock,
g_free (text);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+#if GTK_CHECK_VERSION (2, 10, 0)
+ /* Guard against overlong nonbreakable text (exploit) */
+ gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR);
+#endif
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);