[Xfce4-commits] <postler:master> Check if mailto has arguments before linkifying
Christian Dywan
noreply at xfce.org
Fri Aug 12 22:06:06 CEST 2011
Updating branch refs/heads/master
to 4e59d43b2d2e0d44a312d8a000e5745f5108573a (commit)
from 9f9dd7d6d0596483f284a24770f4732eac11d042 (commit)
commit 4e59d43b2d2e0d44a312d8a000e5745f5108573a
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Aug 12 21:40:10 2011 +0200
Check if mailto has arguments before linkifying
postler/postler-content.vala | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 0396cee..740c414 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -212,9 +212,16 @@ public class Postler.Content : WebKit.WebView {
internal static string linkify_address (string mailto, bool inherit=false) {
var linkified = new StringBuilder ();
- string[] parts = mailto.split ("?", 2);
- string addresses = parts[0];
- string arguments = parts[1] != null ? ("?" + parts[1]) : "";
+ string addresses, arguments;
+ if ("?" in mailto) {
+ string[] parts = mailto.split ("?", 2);
+ addresses = parts[0];
+ arguments = "?" + parts[1];
+ }
+ else {
+ addresses = mailto;
+ arguments = "";
+ }
int count = 0;
foreach (string address in addresses.split (",")) {
More information about the Xfce4-commits
mailing list