encode title and url