Commit Graph

1757 Commits

Author SHA1 Message Date
gleitz be8f4f6fb9 Updated the boolean functions to work with YUI compressor. Linted other files for consistency 2011-06-22 13:54:17 -04:00
tomhuda 1482f1ae72 Add BOOLEAN support 2011-06-01 22:57:22 -07:00
tomhuda 0f78345d0c Add support for INTEGER expressions 2011-06-01 22:33:48 -07:00
Yehuda Katz 4eeda34ad2 Merge pull request #79 from schuyler1d/numbers
allow number indexes in paths for array access
2011-05-25 17:08:18 -07:00
Yehuda Katz ed1be562e2 Merge pull request #81 from schuyler1d/google_json_support
support "$" as an ID character: google has a bunch of json that has $t, etc
2011-05-25 17:06:50 -07:00
Yehuda Katz 04b359d15b Merge pull request #86 from jblotus/master
A few bug fixes
2011-05-25 17:06:31 -07:00
Yehuda Katz f07f70ca42 Merge pull request #68 from rgrove/fix-escaping
Add ", ', and ` to the list of chars that need HTML escaping.
2011-05-25 17:05:54 -07:00
James Fuller 28d35180bd fixing partials with int names 2011-05-24 00:40:09 -04:00
James Fuller 0e22301e8f fixed a syntax error in documentation example 2011-05-18 19:26:15 -07:00
Schuyler Duveen 4e5cf17311 support "$" as an ID character: google has a bunch of json that has $t, etc values 2011-05-13 11:40:31 -04:00
wycats a4ca50533d Add support for line-breaks in mustaches 2011-05-12 12:23:15 -07:00
Schuyler Duveen 1aa512d227 allow number indexes in paths for array access 2011-05-10 12:00:40 -04:00
Ryan Grove 2f4644529c Remove / from the list of escaped chars and add `.
It's probably fine not to escape /, since its only danger is in ending
entities (like &amp/). This isn't a problem for us, since the badChars
regex won't allow it and the & will get escaped.

It turns out ` can be used to quote attribute values in IE, so it needs
to be escaped along with " and '.
2011-05-09 15:19:23 -07:00
Ryan Grove d109e31f62 Merge branch 'master' into fix-escaping
Conflicts:
	lib/handlebars/utils.js
2011-05-09 14:59:51 -07:00
Yehuda Katz 5168037b5a Edited README.markdown via GitHub 2011-05-05 11:22:03 -07:00
Yehuda Katz 92535a9158 Edited README.markdown via GitHub 2011-05-05 11:16:22 -07:00
Yehuda Katz 4f309bb3aa Merge pull request #74 from jeroenvandijk/patch-1
Add a link to the Readme to the very nice documentation site
2011-05-05 11:14:29 -07:00
Yehuda Katz b4c949cc07 Merge pull request #73 from nhocki/patch-1
Adding missing ) to the upgrading section...
2011-05-05 11:14:04 -07:00
Jeroen van Dijk 90bb568faf Add a link to the Readme to the very nice documentation site 2011-05-04 01:37:21 -07:00
tomhuda 60040e60fb Update specs and code so that the function passed to block helpers has the same API as regular compiled templates 2011-05-04 00:03:50 -07:00
Nicolás Hock Isaza a00054e26b Adding missing ) to the upgrading section... 2011-05-03 21:09:09 -07:00
tomhuda 81071dd22c Add VERSION constant 1.0.0.beta.1 2011-05-03 20:39:24 -07:00
tomhuda c29223a98b Update specs for change to template signature 2011-05-03 20:39:14 -07:00
tomhuda 5d99572006 Rename vm.js to compiler.js 2011-05-03 20:38:28 -07:00
tomhuda d83e1c7484 Remove unnecessary original runtime implementation 2011-05-03 20:38:06 -07:00
tomhuda 201ecbd7bc Improve Handlebars subclassability 2011-05-03 19:30:32 -07:00
tomhuda 9333d1210d Add support for passing String parameters to helper 2011-05-03 19:30:32 -07:00
tomhuda 2615fa4bd1 Add a default helperMissing to help catch errors and restore old behavior 2011-05-03 19:30:32 -07:00
Yehuda Katz 3e5bc84058 Merge pull request #69 from rgrove/allow-hyphens.
Allow ids to contain hyphens. Fixes #36.
2011-05-03 19:01:37 -07:00
Yehuda Katz 5d8480fa8a Merge pull request #48 from jasondavies/master.
Fix multi-backslash escaping
2011-05-03 18:59:59 -07:00
Yehuda Katz 56b0ce56f8 Merge pull request #50 from emtrane/spec_patch.
Correct path to vm.js
2011-05-03 18:59:07 -07:00
Yehuda Katz 9dc4bd47e6 Merge pull request #65 from rgrove/master.
Add support for multi-line comments
2011-05-03 18:58:50 -07:00
Yehuda Katz 4fb42d7682 Merge pull request #71 from andrewmbenton/master.
missing semicolon prevents minification
2011-05-03 18:57:57 -07:00
Andrew Benton b0df69ddec add missing semicolon 2011-04-30 19:07:38 -07:00
Ryan Grove b324d002ca Allow ids to contain hyphens. Fixes #36.
Previously, a mustache like {{foo-bar}} would generate a
parse error, which was a departure from the behavior of
other Mustache implementations.
2011-04-28 22:30:21 -07:00
Ryan Grove b291a1ad8c Add ", ', and / to the list of chars that need HTML escaping.
Previously, only < and > were escaped. This meant that any Handlebars
template that used user input in an HTML attribute value was wide open
to a trivial XSS exploit. Note that unquoted attribute values are still
open to attack, but this set of characters at least brings Handlebars in
line with other Mustache implementations and other template languages.

See the OWASP XSS prevention cheat sheet (rule #1) for the rationale
behind escaping these characters:

https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet
2011-04-25 11:15:53 -07:00
Ryan Grove dec196b4d9 The "if" block helper shouldn't treat empty arrays as truthy.
Given the data {foo: []}, the following template previously considered
foo to be truthy when it shouldn't have:

    {{#if foo}}
      You should not see me!
    {{else}}
      You should see me!
    {{/if}}
2011-04-20 16:56:37 -07:00
Ryan Grove aba636ec38 Support multi-line comments.
{{!
Like this.
}}
2011-04-18 16:08:20 -07:00
wycats 038d9b3fee Check in a LICENSE file 2011-04-04 22:18:54 -07:00
tomhuda 6a80531513 Merge branch 'master' of https://github.com/tf/handlebars.js into tf-master 2011-03-26 14:04:49 -07:00
Tim Fischbach a1b1b160cf inserting missing return statement in unless helper (fixes issue #51) 2011-03-09 11:51:00 +01:00
Martin Davidsson f368f9177c Correct path to vm.js for case-sensitive filesystems
lib/Handlebars/vm.js -> lib/handlebars/vm.js
2011-03-05 21:10:18 -08:00
tomhuda a7bb51d8a5 DRY up some code that converts program AST nodes to opcodes. 2011-03-04 15:17:32 -08:00
tomhuda 357710f136 Add support for block hashes and clean up mustache/program code 2011-03-04 15:10:22 -08:00
tomhuda ca9b9671a5 Add Hash arguments to simple mustaches (TODO: add Hash args to block helpers) 2011-03-04 00:11:03 -08:00
tomhuda e0aa705f71 Add support for hash args in the tokenizer and parser 2011-03-03 21:33:28 -08:00
tomhuda 51d2543ba1 Add support for {{foo.bar.baz}} 2011-03-03 20:08:28 -08:00
Jason Davies e5899cad1e Test multi-backslash-escaping 2011-02-28 22:28:11 +00:00
Jason Davies 0397f875c5 Merge branch 'master' of http://github.com/wycats/handlebars.js 2011-02-28 22:23:11 +00:00
Jason Davies 2cf88d4e77 Fix backslash escaping 2011-02-28 22:23:02 +00:00