Tom. Posted February 18, 2016 Share Posted February 18, 2016 I'm sure I've used $sanitizer->selectorValue($value) many times before. However in this case it's getting rid of the | bar and replacing it with a space. Here is my code: $selection = implode($input->get->filter, "|"); $input->whitelist('filter', $selection); if($selection) { $selection = ", category.name=" . $sanitizer->selectorValue($selection); } $activities = $pages->find("template=activity|event, limit=1, sort=title{$selection}"); Filter is a checkbox. Link to comment Share on other sites More sharing options...
BitPoet Posted February 18, 2016 Share Posted February 18, 2016 Uhm. Shouldn't it be $selection = implode("|", $input->get->filter); ? 1 Link to comment Share on other sites More sharing options...
Tom. Posted February 18, 2016 Author Share Posted February 18, 2016 Uhm. Shouldn't it be $selection = implode("|", $input->get->filter); ? Oops, yes it should, however the previous format did work. It shouldn't have. It echoed out fine. Even with swap around it's still being replaced with spaces. Link to comment Share on other sites More sharing options...
BitPoet Posted February 18, 2016 Share Posted February 18, 2016 At least in 2.7.0 it already removed pipe characters (this is from Sanitizer::selectorValue): $value = str_replace(array('*', '~', '`', '$', '^', '|', '<', '>', '=', '[', ']', '{', '}'), ' ', $value); 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now