public function escapeJs($string, $encoding = 'utf-8') {
		
		$current = Escape :: getEncoding();
		Escape :: setEncoding($encoding);
		$result =  Escape :: js($string);
		Escape :: setEncoding($current);

		return $result;
	}
public function escapeJs($string, $encoding = 'utf-8') {
		
		$current = Escape :: getEncoding();
		Escape :: setEncoding($encoding);
		$result =  Escape :: js($string);
		Escape :: setEncoding($current);

		return $result;
	}
public function escapeJs ( $ string , $ encoding = 'utf-8' ) { $ current = Escape :: getEncoding ( ) ; Escape :: setEncoding ( $ encoding ) ; $ result = Escape :: js ( $ string ) ; Escape :: setEncoding ( $ current ) ; return $ result ; }
Escape a string for the Javascript context.
@param string $string
@return string
Escape a string for the Javascript context .