1<pre id="sh_004_url_parsing" class="brush: as3;"> 2/** 3 * Please see <http://www.alexgorbatchev.come/?test=1&y=2> 4 */ 5var home = "http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;"; 6// < http://www.gnu.org/licenses/?test=1&y=2 >. 7 8// Test embedded URLs that include a hash/anchor 9// See github issue #21: https://github.com/alexgorbatchev/SyntaxHighlighter/issues/21#issuecomment-2183732 10var face = "http://example.com/index.php#/other.php"; # i think facebook used to have urls like this 11 12// Test embedded URLs that terminate at a left angle bracket. 13// See bug #28: http://bitbucket.org/alexg/syntaxhighlighter/issue/28/ 14"<location>http://www.example.com/song2.mp3</location>"; 15</pre> 16 17<script type="text/javascript"> 18queue(function() 19{ 20 var $sh; 21 22 module('004_url_parsing'); 23 24 test('check that urls are present', function() 25 { 26 $sh = $('#sh_004_url_parsing'); 27 28 ok_sh($sh); 29 ok_toolbar($sh); 30 ok_code($sh); 31 32 var expected = [ 33 'http://www.alexgorbatchev.come/?test=1&y=2', 34 'http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;', 35 'http://www.gnu.org/licenses/?test=1&y=2', 36 'https://github.com/alexgorbatchev/SyntaxHighlighter/issues/21#issuecomment-2183732', 37 'http://example.com/index.php#/other.php', 38 'http://bitbucket.org/alexg/syntaxhighlighter/issue/28/', 39 'http://www.example.com/song2.mp3' 40 ]; 41 42 $sh.find('td.code a').each(function(index) 43 { 44 equal($(this).attr('href'), expected[index], 'href'); 45 equal($(this).text(), expected[index], 'text'); 46 }) 47 }); 48}); 49</script>