Open myphysicslab opened 7 years ago
I cannot reproduce this at head:
$ bazel build //src/js:dossier_simple
INFO: Found 1 target...
Target //src/js:dossier_simple up-to-date:
bazel-bin/src/js/dossier_simple.js
bazel-bin/src/js/dossier_simple.js.map
INFO: Elapsed time: 0.158s, Critical Path: 0.00s
When Dossier is compiled using
compilation_level = "SIMPLE"
(instead of ADVANCED) in two places in src/js/BUILD, then this runtime error:The problem occurs in code generated from this template in dossier.soy
when simple-compiled, the above becomes (in part)
The problem is there is no property
soydata.UnsanitizedText
. Similarly, there is also no propertysoydata.SanitizedHtmlAttribute
which cause similar problems later on.Workaround: Perform the following text replacements after compilation in the resulting output file
dossier.js
using regular expressions:
find:
soydata\.(UnsanitizedText|SanitizedHtmlAttribute)
replace:
goog.soy.data.$1