From c199191617e9fcec9d68b949c8060c40473dc220 Mon Sep 17 00:00:00 2001
From: "Silas S. Brown" <ssb22@cam.ac.uk>
Date: Sun, 27 Dec 2015 18:22:07 +0000
Subject: [PATCH] Update Web Adjuster, css-generate.py

git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/adjuster@2387 29193198-4895-4776-b068-10539e920549
---
 adjuster.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/adjuster.py b/adjuster.py
index 8396b8c..1544932 100755
--- a/adjuster.py
+++ b/adjuster.py
@@ -1387,7 +1387,10 @@ document.write('<a href="javascript:location.reload(true)">refreshing this page<
                 if '&' in smsLink:
                     smsLink="[Before sending this text, replace -amp- with an ampersand. This substitution has been done in case your phone isn't compliant with RFC 5724.] "+smsLink.replace('&',' -amp- ')
                     # RFC 5724 shows we ought to get away with ampersands encoded as %26, but on Windows Mobile (Opera or IE) we don't; the SMS is truncated at that point.  TODO: whitelist some other platforms? (test with <a href="sms:?body=test1%26test2">this</a>)
-                smsLink = '<br><a href="sms:?body=%s">Send as SMS (text message)</a>' % urllib.quote(rm_u8punc(smsLink))
+                if self.checkBrowser(["iPhone OS 4","iPhone OS 5","iPhone OS 6","iPhone OS 7"]): sep = ';'
+                elif self.checkBrowser(["iPhone OS 8","iPhone OS 9"]): sep = '&'
+                else: sep = '?'
+                smsLink = '<br><a href="sms:'+sep+'body=%s">Send as SMS (text message)</a>' % urllib.quote(rm_u8punc(smsLink))
                 if self.checkBrowser(["Windows Mobile"]): # TODO: others? configurable?
                     # browsers may also have this problem with EMAIL
                     uri = uri.replace("%26","%20-amp-%20")
-- 
GitLab