Commits

Pascal Kriete committed 9eec1e0

Fixed a bug in the Javascript Library where improperly escaped characters could result in arbitrary javascript execution.

Comments (0)

Files changed (1)

system/libraries/Javascript.php

 		}
 		elseif (is_string($result) OR $is_key)
 		{
-			return '"'.str_replace(array('\\', "\t", "\n", "\r", '"'), array('\\\\', '\\t', '\\n', "\\r", '\"'), $result).'"';
+			return '"'.str_replace(array('\\', "\t", "\n", "\r", '"', '/'), array('\\\\', '\\t', '\\n', "\\r", '\"', '\/'), $result).'"';			
 		}
 		elseif (is_scalar($result))
 		{