Fixed a bug in the Javascript Library where improperly escaped characters could result in arbitrary javascript execution.
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index 167859a..34e0d70 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -855,7 +855,7 @@
}
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))
{