summaryrefslogtreecommitdiffstats
path: root/pages/chat.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-03-06 01:45:59 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-03-06 01:45:59 -0800
commit81596179bcfc00b7428e238ab619875e7accb52a (patch)
tree0bcb7b784ff98b00f82758987955212692059c5f /pages/chat.php
parent038cfabc5dec9080befeed62d8d1d6ae58cd795b (diff)
downloadpathery-81596179bcfc00b7428e238ab619875e7accb52a.tar.xz
Chat Pretty Redirect
Diffstat (limited to 'pages/chat.php')
-rw-r--r--pages/chat.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/pages/chat.php b/pages/chat.php
index f2d2231..d2198c7 100644
--- a/pages/chat.php
+++ b/pages/chat.php
@@ -162,6 +162,9 @@ function chatReplaceAndEncode(chat) {
//Replace # in the URL with %23
chat = chat.replace(/<a href='redirect\?to=(.*?)(#)(.*?)' target='_blank'>/ig, "<a href='redirect?to=$1%23$3' target='_blank'>");
+ chat = chat.replace(/<a href='redirect\?to=(.*?)(&amp;)(.*?)' target='_blank'>/ig, "<a href='redirect?to=$1%26$3' target='_blank'>");
+ //Making the bet that not all browsers do the same:
+ chat = chat.replace(/<a href='redirect\?to=(.*?)(&)(.*?)' target='_blank'>/ig, "<a href='redirect?to=$1%26$3' target='_blank'>");
return chat;
}