Bugfix for urls with %28 in the url

This commit is contained in:
Juul Hobert 2014-08-22 13:21:18 +02:00
parent 25c0341715
commit 2e32eab6ae

View File

@ -263,7 +263,7 @@ class SiteTreeSubsites extends DataExtension {
$origDisableSubsiteFilter = Subsite::$disable_subsite_filter;
Subsite::disable_subsite_filter(true);
$candidatePage = DataObject::get_one("SiteTree", "\"URLSegment\" = '" . urldecode( $rest). "' AND \"SubsiteID\" = " . $subsiteID, false);
$candidatePage = DataObject::get_one("SiteTree", "\"URLSegment\" = '" . Convert::raw2sql(urldecode( $rest)) . "' AND \"SubsiteID\" = " . $subsiteID, false);
Subsite::disable_subsite_filter($origDisableSubsiteFilter);
if($candidatePage) {