Skip to content

Commit

Permalink
Fix critical typo (replacing escape with encodeURIComponent)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcav committed Mar 1, 2010
1 parent c77def3 commit b260026
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion flash-src/WebSocket.as
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions flash-src/WebSocketMain.as
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading

0 comments on commit b260026

Please sign in to comment.