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 6aa33e5d9..6319b95f6 100644
--- a/embed/mozilla/EphyPromptService.cpp
+++ b/embed/mozilla/EphyPromptService.cpp
@@ -47,6 +47,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"
@@ -188,6 +189,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);