On Mar 27, 2004, at 13:17, Dan Carlson wrote:
I've just located the problem, at least in the
functional sense:
http://memoryalpha.st-minutiae.com/en/index.php/Memory_Alpha:
How_to_edit_an_article_so_long_that_you_can%27t_edit
http://memoryalpha.st-minutiae.com/en/index.php?title=Memory_Alpha:
How_to_edit_an_article_so_long_that_you_can%27t_edit
The first URL, where the PHP variable is compressed out, does not
work, while the traditional style with "title=" actually DOES work.
Something's wrong with the URL parser, it appears.
Could you try this quick test script?
<?php
$magic = get_magic_quotes_gpc() ? "on" : "off";
print "<p>Magic quotes are <b>$magic</b>.</p>";
$path = $_SERVER['PATH_INFO'];
print "<p>Raw path is: $path</p>\n";
$stripped = stripslashes($path);
print "<p>Stripped path is: $stripped</p>\n";
?>
Then go to /blah/scriptname.php/Apostrophe%27s_some_trouble
It should print out the following:
Magic quotes are on.
Raw path is: /Apostrophe\'s_trouble
Stripped path is: /Apostrophe's_trouble
Now, on my test box, with magic quotes on, the apostrophe title does
with with index.php/Apostrophe%27s after making the hack fix I
described earlier:
if( isset( $_SERVER['PATH_INFO'] ) ) {
$title = stripslashes( substr( $_SERVER['PATH_INFO'], 1 ) );
} else {
$title = stripslashes( $_REQUEST['title'] );
}
(adding the two stripslashes() calls) Make sure they're both in there.
-- brion vibber (brion @
pobox.com)