Cleans up formatting in pagination template.