Index: gnome-packagekit-0.3.14/src/gpk-client-eula.c
===================================================================
--- gnome-packagekit-0.3.14.orig/src/gpk-client-eula.c
+++ gnome-packagekit-0.3.14/src/gpk-client-eula.c
@@ -55,6 +55,31 @@ gpk_client_eula_button_help_cb (GtkWidge
 	gpk_gnome_help ("eula");
 }
 
+static void start_element_callback (GMarkupParseContext *context, const gchar *elem_name, const gchar **att_names, const gchar **attr_vals, gpointer user_data, GError **error)
+{
+	egg_debug ("GMarkupParser start_elem, got elem - %s", elem_name);
+}
+
+static void end_element_callback (GMarkupParseContext *context, const gchar *elem_name, gpointer user_data, GError **error)
+{
+	egg_debug ("GMarkupParser end_elem, got elem - %s", elem_name);
+}
+
+static void text_callback (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error)
+{
+	g_string_append_len ((GString*) user_data, text, text_len);
+}
+
+static void passthrough_callback (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error)
+{
+	egg_debug ("GMarkupParser passthrough, text - %s", text);
+}
+
+static void error_callback (GMarkupParseContext *context, GError *error, gpointer user_data)
+{
+	egg_warning ("GMarkupParser Error parsing - %s", error->message);
+}
+
 /**
  * gpk_client_eula_show:
  *
@@ -102,6 +127,25 @@ gpk_client_eula_show (GtkWindow *window,
 	pk_package_id_free (ident);
 	g_free (text);
 
+	GString *stripped_license = g_string_new (NULL);
+	GError *error = NULL;
+	GMarkupParser parser = {start_element_callback, end_element_callback, text_callback, passthrough_callback, error_callback};
+	GMarkupParseContext *context = g_markup_parse_context_new (&parser, G_MARKUP_PREFIX_ERROR_POSITION, stripped_license, NULL);
+
+	if (g_markup_parse_context_parse (context, license_agreement, strlen (license_agreement), &error) &&
+		g_markup_parse_context_end_parse(context, &error) )
+	{
+		egg_debug ("replacing license with stripped license");
+		license_agreement = stripped_license->str;
+	}
+	else
+	{
+		egg_warning ("Error parsing license - %s", error->message);
+		if (error)
+			g_error_free (error);
+	}
+	g_markup_parse_context_free (context);
+	
 	buffer = gtk_text_buffer_new (NULL);
 	gtk_text_buffer_insert_at_cursor (buffer, license_agreement, strlen (license_agreement));
 	widget = glade_xml_get_widget (glade_xml, "textview_details");
@@ -122,6 +166,7 @@ gpk_client_eula_show (GtkWindow *window,
 	has_agreed_eula = FALSE;
 	gtk_main ();
 
+	g_string_free (stripped_license, TRUE);
 	/* hide window */
 	if (GTK_IS_WIDGET (widget))
 		gtk_widget_hide (widget);
Index: gnome-packagekit-0.3.14/src/gpk-application.c
===================================================================
--- gnome-packagekit-0.3.14.orig/src/gpk-application.c
+++ gnome-packagekit-0.3.14/src/gpk-application.c
@@ -951,17 +951,52 @@ egg_strreplace_indirect (gchar **text, c
 	return TRUE;
 }
 
+static void text_callback (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error)
+{
+	g_string_append_len ((GString*) user_data, text, text_len);
+}
+
+static void error_callback (GMarkupParseContext *context, GError *error, gpointer user_data)
+{
+	egg_debug ("Error parsing - %s", error->message);
+}
+
 /**
  * gpk_application_text_format_display:
  **/
 static gchar *
-gpk_application_text_format_display (const gchar *ascii)
+gpk_application_text_format_display (const gchar *ascii, gboolean strip)
 {
 	gchar *text;
 	text = g_strdup (ascii);
 	egg_strreplace_indirect (&text, "``", "“");
 	egg_strreplace_indirect (&text, "''", "”");
 	egg_strreplace_indirect (&text, "'", "’");
+
+	if (!strip)
+		return text;
+	
+	GString *stripped_text = g_string_new (NULL);
+	GError *error = NULL;
+	GMarkupParser parser = {NULL, NULL, text_callback, NULL, error_callback};
+	GMarkupParseContext *context = g_markup_parse_context_new (&parser, 0, stripped_text, NULL);
+	if (g_markup_parse_context_parse (context, text, g_utf8_strlen (text, -1), &error))
+	{
+		egg_debug ("replacing text with stripped text");
+		g_free (text);
+		text = stripped_text->str;
+	}
+	else
+	{
+		if (stripped_text->str)
+			g_free (stripped_text->str);
+		if (error)
+			g_error_free (error);
+	}
+
+	g_markup_parse_context_free (context);
+	g_string_free (stripped_text, FALSE);
+
 	return text;
 }
 
@@ -1028,7 +1063,7 @@ gpk_application_details_cb (PkClient *cl
 	}
 
 	/* set the description */
-	text = gpk_application_text_format_display (details->description);
+	text = gpk_application_text_format_display (details->description, TRUE);
 	widget = glade_xml_get_widget (application->priv->glade_xml, "textview_description");
 	gpk_application_set_text_buffer (widget, text);
 	g_free (text);
@@ -1088,7 +1123,7 @@ gpk_application_package_cb (PkClient *cl
 		return;
 
 	/* format if required */
-	summary = gpk_application_text_format_display (obj->summary);
+	summary = gpk_application_text_format_display (obj->summary, FALSE);
 	package_id = pk_package_id_to_string (obj->id);
 
 	/* mark as got so we don't warn */
