(s)
| 586 | /* Filter to avoid XSS attacks |
| 587 | */ |
| 588 | function urlEncodeIfNecessary(s) { |
| 589 | var regex = /[\\\"<>\.;]/; |
| 590 | var hasBadChars = regex.exec(s) != null; |
| 591 | return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; |
| 592 | } |
| 593 | |
| 594 | /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only) |
| 595 | */ |