title: Trying to open a URL in a new tab using gscript
body: <p>I'm trying to open a site in a new tab in my browser using Google Script. I found the following script at <a href="https://gist.github.com/rheajt/84d906298dd4e6d6f06a9132d386199b" rel="nofollow noreferrer">https://gist.github.com/rheajt/84d906298dd4e6d6f06a9132d386199b</a> :</p>
  <pre><code>function openTab() {
    var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue();
    
    var html = &quot;&lt;script&gt;window.open('&quot; + selection + &quot;');google.script.host.close();&lt;/script&gt;&quot;;
    
    var userInterface = HtmlService.createHtmlOutput(html);
    
    SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab');
  }
  </code></pre>
  <p>The script opens a new tab, but unfortunately it the URL reads like this:
  <a href="https://n-54i7um4megvoh6ujyzbx4xatgjsopusyvyccwrq-0lu-script.googleusercontent.com/www.domainname.com" rel="nofollow noreferrer">https://n-54i7um4megvoh6ujyzbx4xatgjsopusyvyccwrq-0lu-script.googleusercontent.com/www.domainname.com</a></p>
  <p>I'm not smart enough to understand what's wrong – please help</p>