Permalink
Browse files

Fix critical typo (replacing escape with encodeURIComponent)

  • Loading branch information...
1 parent c77def3 commit b260026221a1105c8daab145c30c7de6dca764e1 @mcav mcav committed Mar 1, 2010
Showing with 7 additions and 7 deletions.
  1. +1 −1 flash-src/WebSocket.as
  2. +2 −2 flash-src/WebSocketMain.as
  3. +1 −1 swfobject.js
  4. +3 −3 web_socket.js
View
@@ -193,7 +193,7 @@ public class WebSocket extends EventDispatcher {
}
var data:String = buffer.readUTFBytes(pos - 1);
main.log("received: " + data);
- dispatchEvent(new WebSocketMessageEvent("message", encodeURIComponentdata)));
+ dispatchEvent(new WebSocketMessageEvent("message", encodeURIComponent(data)));
buffer.readByte();
makeBufferCompact();
pos = -1;
@@ -70,11 +70,11 @@ public class WebSocketMain extends Sprite {
}
public function log(message:String):void {
- ExternalInterface.call("webSocketLog", encodeURIComponent"[WebSocket] " + message));
+ ExternalInterface.call("webSocketLog", encodeURIComponent("[WebSocket] " + message));
}
public function fatal(message:String):void {
- ExternalInterface.call("webSocketError", encodeURIComponent"[WebSocket] " + message));
+ ExternalInterface.call("webSocketError", encodeURIComponent("[WebSocket] " + message));
throw message;
}
Oops, something went wrong.

0 comments on commit b260026

Please sign in to comment.