>What do mean by encoding the title?
Spaces and other special characters might be avoided in a URL string. This will make is easy for browsers to interpret the line. There are various functions of encoding available on the net. I'm sure you'll be able to find one which fits your need.