From: <thr...@us...> - 2008-10-10 21:28:39
|
Revision: 5657 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5657&view=rev Author: thraxisp Date: 2008-10-10 21:28:35 +0000 (Fri, 10 Oct 2008) Log Message: ----------- add absolute URL tests 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-10 21:10:54 UTC (rev 5656) +++ trunk/mantisbt/tests/test_string_sanitize_url.php 2008-10-10 21:28:35 UTC (rev 5657) @@ -31,6 +31,8 @@ */ require_once( 'core.php' ); +$my_path = config_get('path'); +echo "my path is ".$my_path."\n<br />"; $t_test = array( '', 'abc.php', @@ -40,9 +42,18 @@ 'abc.php?abc=def&z=xyz', 'abc.php?abc=def&z=xyz#a', 'abc.php?abc=def&z=<script>alert("foo")</script>z#a', - 'abc.php?abc=def&z=z#<script>alert("foo")</script>a' + 'abc.php?abc=def&z=z#<script>alert("foo")</script>a', + $my_path.'abc.php', + $my_path.'abc.php#a', + $my_path.'abc.php?abc=def', + $my_path.'abc.php?abc=def#a', + $my_path.'abc.php?abc=def&z=xyz', + $my_path.'abc.php?abc=def&z=xyz#a', + $my_path.'abc.php?abc=def&z=<script>alert("foo")</script>z#a', + $my_path.'abc.php?abc=def&z=z#<script>alert("foo")</script>a', + 'http://www.test.my.url/' ); foreach($t_test as $t_url) { - echo $t_url . ' => ' . string_sanitize_url($t_url, false) . "\n"; + echo '<br /> '.$t_url . ' => ' . string_sanitize_url($t_url, false) . "\n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |