From c2f597280b0a693d63d79dd60a9d84c49271e704 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 9 Dec 2015 23:54:24 +0000 Subject: [PATCH] Formatting: Don't make links inside `' === strtolower( $piece ) || '' === strtolower( $piece ) ) ) $nested_code_pre--; if ( $nested_code_pre || empty( $piece ) || ( $piece[0] === '<' && ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) { diff --git a/tests/phpunit/tests/formatting/MakeClickable.php b/tests/phpunit/tests/formatting/MakeClickable.php index dec5d404b0..46c70ee001 100644 --- a/tests/phpunit/tests/formatting/MakeClickable.php +++ b/tests/phpunit/tests/formatting/MakeClickable.php @@ -372,4 +372,30 @@ class Tests_Formatting_MakeClickable extends WP_UnitTestCase { href='mailto:someone@example.com'>someone@example.com"; $this->assertEquals( $html, make_clickable( $html ) ); } + + /** + * @dataProvider data_script_and_style_tags + * @ticket 30162 + */ + public function test_dont_link_script_and_style_tags( $tag ) { + $this->assertEquals( $tag, make_clickable( $tag ) ); + } + + public function data_script_and_style_tags() { + return array( + array( + '', + ), + array( + '', + ), + array( + '', + ), + array( + '', + ), + ); + } + }