Refactoring: Extracting toggleSidebarLink function
Adding filtering for Arabic characters