From: <nuc...@us...> - 2008-10-22 17:49:21
|
Revision: 5712 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5712&view=rev Author: nuclear_eclipse Date: 2008-10-22 17:49:12 +0000 (Wed, 22 Oct 2008) Log Message: ----------- More tests and better test visualizations. Modified Paths: -------------- trunk/mantisbt/tests/test_string_sanitize_url.php Modified: trunk/mantisbt/tests/test_string_sanitize_url.php =================================================================== --- trunk/mantisbt/tests/test_string_sanitize_url.php 2008-10-22 17:26:48 UTC (rev 5711) +++ trunk/mantisbt/tests/test_string_sanitize_url.php 2008-10-22 17:49:12 UTC (rev 5712) @@ -36,6 +36,7 @@ $t_test = array( '', 'abc.php', + 'abc.php?', 'abc.php#a', 'abc.php?abc=def', 'abc.php?abc=def#a', @@ -45,7 +46,9 @@ 'abc.php?abc=def&z=z#<script>alert("foo")</script>a', 'plugin.php?page=Source/index', 'plugin.php?page=Source/list&id=1', + 'plugin.php?page=Source/list&id=1#abc', $my_path.'abc.php', + $my_path.'abc.php?', $my_path.'abc.php#a', $my_path.'abc.php?abc=def', $my_path.'abc.php?abc=def#a', @@ -55,13 +58,14 @@ $my_path.'abc.php?abc=def&z=z#<script>alert("foo")</script>a', $my_path.'plugin.php?page=Source/index', $my_path.'plugin.php?page=Source/list&id=1', + $my_path.'plugin.php?page=Source/list&id=1#abc', 'http://www.test.my.url/' ); -echo '<tt>'; +echo '<pre>'; foreach($t_test as $t_url) { - echo '<br/>' . htmlspecialchars($t_url) . ' => ' . htmlspecialchars(string_sanitize_url($t_url, false)) . "\n"; + echo "\n: ", htmlspecialchars($t_url), "\n: ", htmlspecialchars(string_sanitize_url($t_url, false)), "\n"; } -echo '</tt>'; +echo '</pre>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |