Page 1 of 1

RegisterRoute breaking on "%"

Posted: Wed Aug 15, 2012 1:56 pm
by demafkees
Hello everybody,

I have the following registered route defined in my module file:

Code: Select all

$this->RegisterRoute('/vragen\/(?P<rubriekID>[A-Za-z0-9]+)\/(?P<subrubriekID>[A-Za-z0-9]+)\/(?P<pagina>[0-9]+)\/(?P<zoektype>[0-9]+)\/(?P<zoekveld>[0-9a-zA-Z-%_\+ \']+)$/',array('action'=>'default','returnid'=>'72'));
"zoekveld" is supposed to be filled with the search string provided in the form. I urlencode the provided string, and decode it later.
Now, I am experiencing problems with the "%" character. When I have, for instance the following url:
$params['zoekveld'] should be filled with "question+%26+answer". However, it gets filled with "question " and the rest of the search string is gone.
Is my regular expression to blame or is $params filled incorrectly?
I am running CMS Made Simple 1.11 “Galapagos”.

Thanks in advance!