Need help “sanitizing” a custom function that pulls category slug into body class

Just use $category->slug instead of $category->cat_name. Slugs are already lowercase and with dashes instead of spaces.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)