Fixes #6713: Long names needs to be truncated while listing

I think h() needs removing to avoid double escaping.