Use html_encode and pathurlencode as necessary