summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FAQ.md22
-rw-r--r--README.markdown4
2 files changed, 24 insertions, 2 deletions
diff --git a/FAQ.md b/FAQ.md
new file mode 100644
index 0000000..35cbee9
--- /dev/null
+++ b/FAQ.md
@@ -0,0 +1,22 @@
+# Frequently Asked Questions
+
+1. How can I file a bug report:
+ Please don't hesitate to let us know if you find something wrong! In general we are going to ask for an example of the problem failing, which can be as simple as a jsfiddle/jsbin/etc. We've put together a jsfiddle [template](http://jsfiddle.net/9D88g/11/) to ease this. (We will keep this link up to date as new releases occur, so feel free to check back here)
+
+1. Why is it slower when compiling?
+ The Handlebars compiler must parse the template and construct a JavaScript program which can then be run. Under some environments such as older mobile devices this can have a performance impact which can be avoided by precompiling. Generally it's recommended that precompilation and the runtime library be used on all clients.
+
+1. Why doesn't this work with Content Security Policy restrictions?
+ Handlebars generates a dynamic function for each template which can cause issues with pages that have enabled Content Policy. It's recommended that templates are precompiled or the `unsafe-eval` policy is enabled for sites that must generate dynamic templates at runtime.
+
+1. How can I include script tags in my template?
+ If loading the template via an inlined `<script type="text/x-handlebars">` tag then you may need to break up the script tag with an empty comment to avoid browser parser errors:
+
+```
+ <script type="text/x-handlebars">
+ foo
+ <scr{{!}}ipt src="bar"></scr{{!}}ipt>
+ </script>
+```
+
+ It's generally recommended that templates are served through external, precompiled, files, which do not suffer from this issue.
diff --git a/README.markdown b/README.markdown
index a675c00..87b17aa 100644
--- a/README.markdown
+++ b/README.markdown
@@ -455,7 +455,7 @@ gem build handlebars-source.gemspec
gem push handlebars-source-*.gem
```
-After this point the handlebars site needs to be updated to point to the new version numbers. The jsfiddle bitly link should be updated to point to the most recent distribution.
+After this point the handlebars site needs to be updated to point to the new version numbers. The jsfiddle link should be updated to point to the most recent distribution for all instances in our documentation.
License
-------
@@ -466,4 +466,4 @@ Handlebars.js is released under the MIT license.
[generator-release]: https://github.com/walmartlabs/generator-release
[pull-request]: https://github.com/wycats/handlebars.js/pull/new/master
[issue]: https://github.com/wycats/handlebars.js/issues/new
-[jsfiddle]: http://l.kde.cc/hbs-bug
+[jsfiddle]: http://jsfiddle.net/9D88g/11/