diff options
author | 2009-07-17 18:13:02 -0400 | |
---|---|---|
committer | 2009-07-17 18:13:02 -0400 | |
commit | 28caa2aa78f1dbfd7119ec742da0181f8863c6fa (patch) | |
tree | 85efbfe641d7226577be86c3e575d508b2d18621 /lib/js/urweb.js | |
parent | b3621d4658f2c841681abb4250858c6a82489af2 (diff) |
Tweaking demos a bit
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r-- | lib/js/urweb.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 60de8744..29728a7a 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -422,11 +422,11 @@ function pflo(s) { } function uf(s) { - return escape(s).replace(new RegExp ("/", "g"), "%2F"); + return escape(s).replace(new RegExp ("/", "g"), "%2F").replace(new RegExp ("\\+", "g"), "%2B"); } function uu(s) { - return unescape(s).replace(new RegExp ("\\+", "g"), " "); + return unescape(s); } @@ -564,7 +564,11 @@ function listener() { } catch (e) { } if (isok) { - var lines = xhr.responseText.split("\n"); + var text = xhr.responseText + if (text == "") + return; + var lines = text.split("\n"); + if (lines.length < 2) { discon(); return; @@ -603,7 +607,7 @@ function listener() { try { if (xhr.status != 0) servErr("Error querying remote server for messages: " + xhr.status); - } catch (e) { servErr("Error querying remote server for messages"); } + } catch (e) { } } } }; |