Jan Lehnardt
90cc5f0d18
Release 0.4.2
14 anni fa
Jan Lehnardt
d881e65044
add minify task
14 anni fa
Jan Lehnardt
ce37e837e6
0.4.x is now 0.4.2-dev
14 anni fa
Jan Lehnardt
6cc841190f
Release 0.4.1
14 anni fa
Jan Lehnardt
55520862d6
see git log
14 anni fa
Jan Lehnardt
fe74ff57f2
Merge pull request #173 from bennage/0.4.x
Add nuget spec for 0.4.1
14 anni fa
Christopher Bennage
a764164a74
added nuget specification
14 anni fa
Jan Lehnardt
3abcd5bb91
Merge pull request #169 from eric-brechemier/maintenance
Maintenance - Fixes for escaping of apostrophe
14 anni fa
Eric Bréchemier
172c34a24f
Bug fix: do not escape & in ' entity for apostrophe
The fix consists in adding #? in the negative look-ahead expected to reject
entity references:
& // character '&'
(?! // not followed by
#? // an optional # (numerical entity), followed by
\w+ // a word, followed by
; // character ';'
)
instead of
& // character '&'
(?! // not followed by
\w+ // a word, followed by
; // character ';'
)
14 anni fa
Eric Bréchemier
aa5a034e2f
Add unit test for bug: extra escaping of & in ' entity for apostrophe
When found in a replacement value, ' should be left untouched, not escaped
as ' which makes the entity visible instead of displaying an apostrophe
in a browser.
14 anni fa
Eric Bréchemier
9f8937bd69
Revert "Use ''' instead of ''', which showed in template output"
As reported by Chad Weider (Thanks!), the apostrophe should not be escaped as
"'" in HTML documents, but using a numeric entity "'" or "'".
Unlike """, "'" has not beed defined in the W3C Recommendation
for HTML 4 [1].
References:
[1] HTML 4.01 Specification
§24.4.1 The list of characters
http://www.w3.org/TR/html4/sgml/entities.html#h-24.3.1
[2] Why shouldn't `'` be used to escape single quotes?
http://stackoverflow.com/questions/2083754
/why-shouldnt-apos-be-used-to-escape-single-quotes
[3] OWASP - The Open Web Application Security Project
RULE #1 - HTML Escape Before Inserting Untrusted Data into HTML Element Content
"' is not recommended"
https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content
See details of the discussion on Github issue tracker:
https://github.com/janl/mustache.js/pull/166
This reverts commit e20cee5f3e .
Conflicts:
mustache.js
14 anni fa
Eric Bréchemier
02de820560
Add rule to ignore temp vim files
14 anni fa
Eric Bréchemier
d33d413fc3
Delete sections describing install using a package manager
The installation of gems using the package manager is tweaked for Ubuntu/Debian
and 'rake' is not made available on the path after install using gem. The
install from source leads to a more consistent setup.
14 anni fa
Eric Bréchemier
ecc228f4fd
Add section to describe how to install node.js from source
14 anni fa
Eric Bréchemier
068ed54729
Add section to describe how to install node.js using a package manager
14 anni fa
Eric Bréchemier
96efb0a064
Add section describing how to install Ruby and gems using a package manager
14 anni fa
Eric Bréchemier
695bd85683
Add notice: tests are only expected to run in *nix environment
14 anni fa
Jan Lehnardt
e9af5496e9
Merge pull request #166 from eric-brechemier/maintenance
0.4.x Maintenance
14 anni fa
Eric BRECHEMIER
e94a477e76
Tag as 0.4.1-dev
14 anni fa
Eric BRECHEMIER
20cc2c6efc
Add tag 0.4.1-dev-familywall
14 anni fa
Eric BRECHEMIER
e20cee5f3e
Use ''' instead of ''', which showed in template output
Issue observed during the development of familywall.com, in some conditions.
For some reason, using ''' instead fixed the issue.
14 anni fa
Eric BRECHEMIER
f86e5ca559
Update version number to match previous tag
Warning: the tagged version still advertises version "0.4.0".
14 anni fa
Eric BRECHEMIER
01d01562e6
Fix greedy parsing of section name
Issue noticed for the transformation of a template for familywall.com,
using MustacheJS 0.3.0. In the anonymous function(match,type,name,content)
in render_section, the name of the section was incorrectly recognized as:
place}} <dd class="field"> <strong>{{#i18n
within a match where the same string is repeated after a / at the end:
{{#place}} <dd class="field"> <strong>{{#i18n}}event.where_event_form{{/i18n}}</strong> <span class="hide" data-field="placeId">{{placeId}}</span> <span>{{name}}</span> </dd> {{/place}} <dd class="field"> <strong>{{#i18n}}
This is an unlikely bug, due to the use of the greedy operator + instead of
its non-greedy counterpart +?.
14 anni fa
Eric BRECHEMIER
855ea69ec1
This is a fork of the tag 0.4.0, for maintenance
14 anni fa
Jan Lehnardt
3f15f72fbf
0.4.0
14 anni fa
Michael Jackson
def81a0700
Add spec for & tags ( fixes #83 )
14 anni fa
Don Brown
634b29d275
83: Add support for & operator for unescaping
Conflicts:
mustache.js
15 anni fa
Michael Jackson
bf95689f42
Support for partial paths ( fixes #91 )
Uses the work done by @nateware in pull request 92. Thanks!
14 anni fa
Michael Jackson
db5f5ece0b
Faster escapeHTML
See http://jsperf.com/string-replace-function
14 anni fa
Jan Lehnardt
99b5aa1a3d
-y oh -y
14 anni fa
Jan Lehnardt
ceafe886cb
Travis builders are now on Ubuntu 11.04 "Natty". The xulrunner
package name is now "xulrunner-2.0". We need this to run our tests
in SpiderMonkey.
14 anni fa
Michael Jackson
9a8ff7638a
Refactor escapeHTML
14 anni fa
Michael Jackson
2f4ccb950f
Update README
14 anni fa
Michael Jackson
846d1d3498
Update testing instructions
14 anni fa
Michael Jackson
3ac02f342a
Use .mustache file extension
14 anni fa
Michael Jackson
f127f48bf4
Move all tests to spec directory
14 anni fa
Michael Jackson
0e49002087
Add node to test suite
14 anni fa
Michael Jackson
f6273dd624
Move templates to wrappers directory
14 anni fa
Michael Jackson
ff40abbbbc
Format comment
14 anni fa
Michael Jackson
9867b8d917
Clean up runner.js
14 anni fa
Michael Jackson
89863d714b
Use rake/clean
14 anni fa
Michael Jackson
65eb4220ca
Fix indentation
14 anni fa
Michael Jackson
3bbe1ab9d8
Fix rendering partials w/o data
Thanks drobbins (see https://github.com/janl/mustache.js/pull/113 )
14 anni fa
Michael Jackson
93dd0ddb91
Consistent use of typeof
14 anni fa
Michael Jackson
a20cf0032b
Consistent spacing
14 anni fa
Michael Jackson
f44254cc7e
Use native String#trim when available
Uses a method similar to jQuery.trim in jQuery 1.7.1.
14 anni fa
Michael Jackson
ff543bb74d
Use native Array.isArray when available
14 anni fa
Michael Jackson
ae5f8aded0
Ignore .rvmrc
14 anni fa
Michael Jackson
486cbd6870
Merge pull request #130 from tmcw/commonjs-wrap
Condition module.exports to make commonjs version work in browsers and no
14 anni fa
Jan Lehnardt
d8f2f553c4
bump ruby version
14 anni fa