Skip to content
This repository
Browse code

allowing tel protocol for mobile devices

  • Loading branch information...
commit b73be3139f3394d73f7a2c459b3f6c061b30ef6b 1 parent d94cdc6
Mark authored August 01, 2012
3  lib/Cake/Routing/Router.php
@@ -832,7 +832,8 @@ public static function url($url = null, $full = false) {
832 832
 			if (
833 833
 				(strpos($url, '://') !== false ||
834 834
 				(strpos($url, 'javascript:') === 0) ||
835  
-				(strpos($url, 'mailto:') === 0)) ||
  835
+				(strpos($url, 'mailto:') === 0) ||
  836
+				(strpos($url, 'tel:') === 0)) ||
836 837
 				(!strncmp($url, '#', 1))
837 838
 			) {
838 839
 				return $url;
3  lib/Cake/Test/Case/Routing/RouterTest.php
@@ -2484,6 +2484,9 @@ public function testUrlProtocol() {
2484 2484
 
2485 2485
 		$url = '://example.com';
2486 2486
 		$this->assertEquals($url, Router::url($url));
  2487
+
  2488
+		$url = 'tel:012345-678';
  2489
+		$this->assertEquals($url, Router::url($url));
2487 2490
 	}
2488 2491
 
2489 2492
 /**

0 notes on commit b73be31

Please sign in to comment.
Something went wrong with that request. Please try again.