fix unescaped string
improve tab "active" detection for categories