Site icon Hip-Hop Website Design and Development

How to remove double quotes in a shortcode?

I am attempting to write a shortcode that takes a URL and builds an iframe out of it. The code for the iframe is always the same except the url.

I want to pass the url to the shortcode and build the iframe, but I can’t seem to remove the double quotes.

Just as a test I tried this:

    add_shortcode( 'lead1212_player', 'lead1212_player_injection' );
function lead1212_player_injection($atts) {
    $a = shortcode_atts( array( 'url' => 'https://www.example.com' ), $atts );
    $myurl = $a['url'];
    print "myurl is $myurl";
    $myurl = str_replace('"', '', $myurl);
    print "myurl is $myurl";
}

Both print statements return the same thing. The output is
myurl is "http://www.example.com" my url is "http://www.example.com"