Calling shortcode in wp_localize_script strips result

Try to add ob_start(); and ob_clean(); to showads function, that might be better to not break the output.

function showads(){
    ob_start();
    echo do_shortcode('[myshortcode]');
    $result = ob_clean();
    return $result;
    exit();
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)