Skip to content
Browse files

repeat the replace

  • Loading branch information...
1 parent a7df6f9 commit dba1ab9d57163283d284cbdcdea165ae67ba8237 @xantus committed Mar 28, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 script/websocket-irc-example-1
View
4 script/websocket-irc-example-1
@@ -204,8 +204,8 @@ __DATA__
}
function output(str) {
- var escaped = str.replace( /&/, '&amp;' ).replace( /</, '&lt;' ).
- replace( />/, '&gt;' ).replace( /"/, '&quot;' );
+ var escaped = str.replace( /&/, '&amp;', 'g' ).replace( /</, '&lt;', 'g' ).
+ replace( />/, '&gt;', 'g' ).replace( /"/, '&quot;', 'g' );
log.innerHTML = log.innerHTML + escaped;
log.scrollTop = log.scrollHeight;
}

0 comments on commit dba1ab9

Please sign in to comment.
Something went wrong with that request. Please try again.