Escape square brackets in Search Tag Cloud(SOLVED)

Permalink
Hello!

I'm trying to create a clean page, following the W3C rules, but I'm getting a big trouble to escape the urls produced by the Search Block - Search Block Tags Cloud.

$qs = $akc->field('atSelectOptionID') . '[]=' . $akct->getSelectAttributeOptionID();
....


I added the line:
$qs = urlencode($qs);


And I get the following result:

/index.php/search-results-en?akID%5B8%5D%5BatSelectOptionID%5D%5B%5D%3D14


For W3C looks ok, but when I click in this link I just get large list of results, what I mean is, I just get all pages. If I don't escape I get only the pages that have the corresponding Tag.

How can I escape following the W3C and at the same time don't broken Concrete5, because get a long list of errors in W3C it's really not good for SEO.

Thank you very much.
Best regards.

Thanks to EC-Joe in GitHub
This is the solution:
$qs = urlencode($akc->field('atSelectOptionID') . '[]') . '=' . urlencode($akct->getSelectAttributeOptionID());


https://github.com/ExchangeCore/concrete5-5.7.0/commit/90bed24bbe8f9...

Thank you very much.

pedroserapio