You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/robfig/closure-templates/test.soy:7: error: Invalid or ambiguous syntax prevents Soy from escaping this template correctly:
- TrustedResourceUris containing dynamic content must have a fixed scheme (https) and host using one of the following formats:
* https://foo/
* //foo/
* /foo
or move the calculation of this URL outside of the template and use an ordaining API.
7: href="/{$appName}/public/stylesheets/styles.css">
^
I don't understand why -- it is exactly the third format mentioned in the error message. What am I doing wrong?
EDIT: Here are other URLs that result in the same error:
/foo/{$appName}/public/stylesheets/styles.css
//{$domain}/foo
http://localhost:3000/app/{$appName}.css
The text was updated successfully, but these errors were encountered:
robfig
pushed a commit
to robfig/closure-templates
that referenced
this issue
Dec 1, 2020
@robfig I am quite new to Closure templates and experienced a similar issue. A solution that is working is to pass the URI to set as a param of type trusted_resource_uri and then using it as the href attribute value.
This template:
Fails to compile with this error:
I don't understand why -- it is exactly the third format mentioned in the error message. What am I doing wrong?
EDIT: Here are other URLs that result in the same error:
/foo/{$appName}/public/stylesheets/styles.css
//{$domain}/foo
http://localhost:3000/app/{$appName}.css
The text was updated successfully, but these errors were encountered: