diff --git a/tests/phpunit/tests/formatting/EscUrl.php b/tests/phpunit/tests/formatting/EscUrl.php
index 9b97a92..478d385 100644
--- a/tests/phpunit/tests/formatting/EscUrl.php
+++ b/tests/phpunit/tests/formatting/EscUrl.php
@@ -63,6 +63,18 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase {
 	}
 
 	/**
+	 * @ticket 16859
+	 */
+	function test_square_brackets() {
+		$this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo[bar]=baz' ) );
+		$this->assertEquals( 'http://example.com/?baz=bar&#038;foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo[bar]=baz' ) );
+		//IPv6 addresses in urls - RFC2732
+		$this->assertEquals( 'http://[::FFFF::127.0.0.1]', esc_url( 'http://[::FFFF::127.0.0.1]' ) );
+		$this->assertEquals( 'http://[::127.0.0.1]', esc_url( 'http://[::127.0.0.1]' ) );
+		$this->assertEquals( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]', esc_url( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]' ) );
+	}
+
+	/**
 	 * @ticket 21974
 	 */
 	function test_protocol_relative_with_colon() {
diff --git a/tests/phpunit/tests/formatting/MakeClickable.php b/tests/phpunit/tests/formatting/MakeClickable.php
index dec5d40..ef55b5c 100644
--- a/tests/phpunit/tests/formatting/MakeClickable.php
+++ b/tests/phpunit/tests/formatting/MakeClickable.php
@@ -365,6 +365,23 @@ class Tests_Formatting_MakeClickable extends WP_UnitTestCase {
 	}
 
 	/**
+	 * @ticket 16859
+	 */
+	function test_square_brackets() {
+		$urls_before = array(
+			'http://example.com/?foo[bar]=baz',
+			'http://example.com/?baz=bar&foo[bar]=baz',
+		);
+		$urls_expected = array(
+			'<a href="http://example.com/?foo%5Bbar%5D=baz" rel="nofollow">http://example.com/?foo%5Bbar%5D=baz</a>',
+			'<a href="http://example.com/?baz=bar&#038;foo%5Bbar%5D=baz" rel="nofollow">http://example.com/?baz=bar&#038;foo%5Bbar%5D=baz</a>',
+		);
+		foreach ($urls_before as $key => $url) {
+			$this->assertEquals( $urls_expected[$key], make_clickable( $url ) );
+		}
+	}
+
+	/**
 	 * @ticket 19028
 	 */
 	function test_line_break_in_existing_clickable_link() {
