in reply to Re: ampersand in
in thread ampersand in

Here is the code (the script is www.e-classifieds.net Standard Edition):
if (($fields[$index_of_pmail] eq "No" || $fields[$index_of_pmail] eq " +") && ($form_data{'show_temp_ads'} eq "")) { print qq~ <a href="$script_url?session_key=$session_key&display_reply_form_butto +n=on&results_format=off&db_id=$fields[$index_of_db_id]&exact_match=on +&query=retrieval">Reply to Ad</a>~; } else { print qq~ <a href="mailto:$fields[$index_of_email]?subject=Reply To Ad #$fields[ +$index_of_id] at $sitename">$fields[$index_of_email]</a>~; }
Even if I try to display a link like this: <a href="mailto:rob@ebrae.com?subject=Bob & Tom">rob@ebrae.com</a> The subject line still reads: Subect: "Bob " Do you think there is even a way around this, regardless if the output is cgi generated?

Replies are listed 'Best First'.
Re: Re: Re: ampersand in
by blakem (Monsignor) on Sep 08, 2001 at 03:33 UTC
    Try replacing your spaces with the '+' sign...
    <a href="mailto:rob@ebrae.com?subject=Bob+&+Tom">rob@ebrae.com</a>
    More generally you should look at the uri_escape function in the URI::Escape module.

    -Blake