MCPcopy Create free account
hub / github.com/CreateJS/SoundJS / urlEncodeIfNecessary

Function urlEncodeIfNecessary

lib/flashaudioplugin-NEXT.js:621–625  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

619 /* Filter to avoid XSS attacks
620 */
621 function urlEncodeIfNecessary(s) {
622 var regex = /[\\\"<>\.;]/;
623 var hasBadChars = regex.exec(s) != null;
624 return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
625 }
626
627 /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
628 */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected