We've just upgraded to SS 3.1.2 and seem to have a problem will all URLs that the CMS suggests based on a page's title (regardless of page type) is coming back with '20' everywhere a space is in the title. Sure, %20 is HTML encoded space, but I've not seen this issue on another 3.x site I run. So wondering if it's a setup issue. Problem is duplicated both on a WAMP server and a CENTOS Linux machine.
I've managed to trace where Silverstripe does this and the point of issue to /framwork/model/URLSegmentFilter.php. Method filter(). Line ~76.
$replacements = $this->getReplacements();
// Unset automated removal of non-ASCII characters, and don't try to transliterate
if($this->getAllowMultibyte() && isset($replacements['/[^A-Za-z0-9\-]+/u'])) {
unset($replacements['/[^A-Za-z0-9\-]+/u']);
}
Debug::dump($name);
foreach($replacements as $regex => $replace) {
$name = preg_replace($regex, $replace, $name);
}
Debug::dump($name);
You can see my two debug dumps there. Which output the following respectively:
URLSegmentFilter.php:78 -
new%20blog%20entry%20-%20this%20is%20a
URLSegmentFilter.php:83 -
new20blog20entry20-20this20is20a
So either something is funky with the regex that is coming back in getReplacements(), or something else is going on. I'm inclined to be sus about allowMultibyte, but I am not sure what affect this will have on the rest of the site.
Any ideas what is going on here?
Cheers