Merge pull request #2668 from garthkerr/patch-1

Add return type for view loader.
diff --git a/application/config/mimes.php b/application/config/mimes.php
index ad36021..99b1c4b 100644
--- a/application/config/mimes.php
+++ b/application/config/mimes.php
@@ -97,7 +97,7 @@
 	'ra'	=>	'audio/x-realaudio',
 	'rv'	=>	'video/vnd.rn-realvideo',
 	'wav'	=>	array('audio/x-wav', 'audio/wave', 'audio/wav'),
-	'bmp'	=>	array('image/bmp', 'image/x-windows-bmp'),
+	'bmp'	=>	array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
 	'gif'	=>	'image/gif',
 	'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
 	'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
@@ -177,4 +177,4 @@
 );
 
 /* End of file mimes.php */
-/* Location: ./application/config/mimes.php */
\ No newline at end of file
+/* Location: ./application/config/mimes.php */
diff --git a/application/config/user_agents.php b/application/config/user_agents.php
index 5887a15..9177f3e 100644
--- a/application/config/user_agents.php
+++ b/application/config/user_agents.php
@@ -81,6 +81,7 @@
 // The order of this array should NOT be changed. Many browsers return
 // multiple browser types so we want to identify the sub-type first.
 $browsers = array(
+	'OPR'			=> 'Opera',
 	'Flock'			=> 'Flock',
 	'Chrome'		=> 'Chrome',
 	'Opera'			=> 'Opera',
@@ -222,4 +223,4 @@
 );
 
 /* End of file user_agents.php */
-/* Location: ./application/config/user_agents.php */
\ No newline at end of file
+/* Location: ./application/config/user_agents.php */
diff --git a/system/core/Output.php b/system/core/Output.php
index 7a5fb66..04209d9 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -847,7 +847,7 @@
 		}
 
 		// Remove CSS comments
-		$output = preg_replace('!/\*([^/][^*]*\*)*/(?!.+?["\'])!i', '', $output);
+		$output = preg_replace('@/\*([^/][^*]*\*)*/(?!.+?["\'])@i', '', $output);
 
 		// Remove Javascript inline comments
 		if ($has_tags === TRUE && strpos(strtolower($open_tag), 'script') !== FALSE)
diff --git a/system/core/Security.php b/system/core/Security.php
index 70cf3e0..368e17d 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -603,7 +603,7 @@
 	 */
 	public function strip_image_tags($str)
 	{
-		return preg_replace(array('#<img\s+.*?src\s*=\s*["\'](.+?)["\'].*?\>#', '#<img\s+.*?src\s*=\s*(.+?).*?\>#'), '\\1', $str);
+		return preg_replace(array('#<img[\s/]+.*?src\s*=\s*["\'](.+?)["\'].*?\>#', '#<img[\s/]+.*?src\s*=\s*(.+?).*?\>#'), '\\1', $str);
 	}
 
 	// ----------------------------------------------------------------
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 0cc5bd1..85f1f4e 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -328,11 +328,8 @@
 		{
 			$selected = array($_POST[$name]);
 		}
-
-		if ($extra != '')
-		{
-			$extra = ' '.$extra;
-		}
+		
+		$extra = _attributes_to_string($extra);
 
 		$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';