From f04b70c9c12daf0e91c591a732566ab8e5b4752c Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sat, 8 Jun 2013 14:56:35 -0500 Subject: Prevent curse from crashing the server with the map editor --- pages/mapeditor.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pages') diff --git a/pages/mapeditor.php b/pages/mapeditor.php index b86aa14..9e1e57c 100644 --- a/pages/mapeditor.php +++ b/pages/mapeditor.php @@ -180,6 +180,8 @@ function updateName() { } function changeDimensions(width, height) { + width = Math.Min(width, 50); + height = Math.Min(height, 50); testMap.tiles = constructTiles(width, height, testMap); //testMap.tiles[0][3] = Array('s'); -- cgit v1.2.3 From f4d221abc57c35a66e8e2c616f1029f86dec1f8e Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sat, 8 Jun 2013 15:05:14 -0500 Subject: question marks now work in chat --- pages/chat.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pages') diff --git a/pages/chat.php b/pages/chat.php index 4a14a8d..a285d7d 100644 --- a/pages/chat.php +++ b/pages/chat.php @@ -179,9 +179,10 @@ function chatReplaceAndEncode(chat) { var URLexp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; chat = chat.replace(URLexp, "$1"); - //Replace # in the URL with %23 + //Replace # with %23, & with %26, ? with %3F chat = chat.replace(/ Date: Sat, 8 Jun 2013 15:14:57 -0500 Subject: BUGFIX: Clicking on links in chat is broken --- pages/chat.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pages') diff --git a/pages/chat.php b/pages/chat.php index a285d7d..f55476f 100644 --- a/pages/chat.php +++ b/pages/chat.php @@ -177,7 +177,7 @@ function chatReplaceAndEncode(chat) { //Surround all URLs with a link var URLexp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - chat = chat.replace(URLexp, "$1"); + chat = chat.replace(URLexp, "$1"); //Replace # with %23, & with %26, ? with %3F chat = chat.replace(/