original_string: public static function prepareVariableForJavascript($string, $asObject) {
  		if ($asObject) {
  			$string = str_replace(array(
  				'"', '/', '<', "\n", "\r"
  			), array(
  				'\"', '\/', '\<', '<br />', ''
  			), $string);
  		} else {
  			$string = str_replace(array(
  				'"', '/', '<', "\n", "\r"
  		  ), array(
  				'\"', '\/', '\<', '', ''
  			), $string);
  		}
  
  		return $string;
  	}
code: public static function prepareVariableForJavascript($string, $asObject) {
  		if ($asObject) {
  			$string = str_replace(array(
  				'"', '/', '<', "\n", "\r"
  			), array(
  				'\"', '\/', '\<', '<br />', ''
  			), $string);
  		} else {
  			$string = str_replace(array(
  				'"', '/', '<', "\n", "\r"
  		  ), array(
  				'\"', '\/', '\<', '', ''
  			), $string);
  		}
  
  		return $string;
  	}
code_tokens: public static function prepareVariableForJavascript ( $ string , $ asObject ) { if ( $ asObject ) { $ string = str_replace ( array ( '"' , '/' , '<' , "\n" , "\r" ) , array ( '\"' , '\/' , '\<' , '<br />' , '' ) , $ string ) ; } else { $ string = str_replace ( array ( '"' , '/' , '<' , "\n" , "\r" ) , array ( '\"' , '\/' , '\<' , '' , '' ) , $ string ) ; } return $ string ; }
docstring: Replaces special characters for the usage inside javascript
  
  @param string $string
  @param boolean $asObject
  @return string
docstring_tokens: Replaces special characters for the usage inside javascript