Big thanks to PIXCLINIC for pointing out, investigating and repairing this bug
AJAX part didn't work correctly if you have quotes or space.
addslashes() added to categories_js.php

More...