'@see: Unittests at test_url.py
:return: String that represents the current URL'

def url_encode(self):

    self_str = str(self)
    qs = ''
    qs_start_index = self_str.find('?')
    if (qs_start_index > (-1)):
        qs = ('?' + str(self.querystring))
        self_str = self_str[:qs_start_index]
    return ('%s%s' % (urllib.quote(self_str, safe=self.SAFE_CHARS), qs))
