types/src/main/java/com/google/common/html/types/SafeHtmls.java
public static SafeHtml fromScriptUrlWithCspNonce(TrustedResourceUrl trustedResourceUrl,
      String cspNonce) {
    String escapedUrl = htmlEscapeInternal(trustedResourceUrl.getTrustedResourceUrlString());
    return create("<script type=\"text/javascript\" nonce=\"" + htmlEscapeInternal(cspNonce)
        + "\" src=\"" + escapedUrl + "\"></script>");
  }
public static SafeHtml fromScriptUrlWithCspNonce(TrustedResourceUrl trustedResourceUrl,
      String cspNonce) {
    String escapedUrl = htmlEscapeInternal(trustedResourceUrl.getTrustedResourceUrlString());
    return create("<script type=\"text/javascript\" nonce=\"" + htmlEscapeInternal(cspNonce)
        + "\" src=\"" + escapedUrl + "\"></script>");
  }
Creates a &lt;script type="text/javascript" src="<i>url</i>"&gt;&lt;script&gt; where the
{@code src} attribute points to the given {@code trustedResourceUrl}.
The tag has a nonce attribute populated from the provided CSP nonce value.