Skip to content
Snippets Groups Projects
Commit f87a0883 authored by Jérôme Guelfucci's avatar Jérôme Guelfucci
Browse files

Fix BBCode, it cannot contain new lines and spaces.

Reported by Andrey.
parent 241b1b36
No related branches found
No related tags found
No related merge requests found
...@@ -908,7 +908,7 @@ static void cb_image_uploaded (ScreenshooterJob *job, ...@@ -908,7 +908,7 @@ static void cb_image_uploaded (ScreenshooterJob *job,
g_strdup_printf ("<a href=\"%s\">\n <img src=\"%s\" />\n</a>", g_strdup_printf ("<a href=\"%s\">\n <img src=\"%s\" />\n</a>",
image_url, thumbnail_url); image_url, thumbnail_url);
bb_code = bb_code =
g_strdup_printf ("[url=%s]\n [img]%s[/img]\n[/url]", image_url, thumbnail_url); g_strdup_printf ("[url=%s][img]%s[/img][/url]", image_url, thumbnail_url);
last_user_temp = g_object_get_data (G_OBJECT (job), "user"); last_user_temp = g_object_get_data (G_OBJECT (job), "user");
...@@ -1039,6 +1039,8 @@ static void cb_image_uploaded (ScreenshooterJob *job, ...@@ -1039,6 +1039,8 @@ static void cb_image_uploaded (ScreenshooterJob *job,
10); 10);
gtk_text_view_set_editable (GTK_TEXT_VIEW (bb_code_view), gtk_text_view_set_editable (GTK_TEXT_VIEW (bb_code_view),
FALSE); FALSE);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (bb_code_view),
GTK_WRAP_CHAR);
gtk_container_add (GTK_CONTAINER (bb_frame), bb_code_view); gtk_container_add (GTK_CONTAINER (bb_frame), bb_code_view);
/* Show the dialog and run it */ /* Show the dialog and run it */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment