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年前
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年前
Eric Bréchemier
02de820560
Add rule to ignore temp vim files
14年前
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年前
Eric Bréchemier
ecc228f4fd
Add section to describe how to install node.js from source
14年前
Eric Bréchemier
068ed54729
Add section to describe how to install node.js using a package manager
14年前
Eric Bréchemier
96efb0a064
Add section describing how to install Ruby and gems using a package manager
14年前
Eric Bréchemier
695bd85683
Add notice: tests are only expected to run in *nix environment
14年前
Eric BRECHEMIER
e94a477e76
Tag as 0.4.1-dev
14年前
Eric BRECHEMIER
20cc2c6efc
Add tag 0.4.1-dev-familywall
14年前
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年前
Eric BRECHEMIER
f86e5ca559
Update version number to match previous tag
Warning: the tagged version still advertises version "0.4.0".
14年前
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年前
Eric BRECHEMIER
855ea69ec1
This is a fork of the tag 0.4.0, for maintenance
14年前
Jan Lehnardt
3f15f72fbf
0.4.0
14年前
Michael Jackson
def81a0700
Add spec for & tags ( fixes #83 )
14年前
Don Brown
634b29d275
83: Add support for & operator for unescaping
Conflicts:
mustache.js
15年前
Michael Jackson
bf95689f42
Support for partial paths ( fixes #91 )
Uses the work done by @nateware in pull request 92. Thanks!
14年前
Michael Jackson
db5f5ece0b
Faster escapeHTML
See http://jsperf.com/string-replace-function
14年前
Jan Lehnardt
99b5aa1a3d
-y oh -y
14年前
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年前
Michael Jackson
9a8ff7638a
Refactor escapeHTML
14年前
Michael Jackson
2f4ccb950f
Update README
14年前
Michael Jackson
846d1d3498
Update testing instructions
14年前
Michael Jackson
3ac02f342a
Use .mustache file extension
14年前
Michael Jackson
f127f48bf4
Move all tests to spec directory
14年前
Michael Jackson
0e49002087
Add node to test suite
14年前
Michael Jackson
f6273dd624
Move templates to wrappers directory
14年前
Michael Jackson
ff40abbbbc
Format comment
14年前
Michael Jackson
9867b8d917
Clean up runner.js
14年前
Michael Jackson
89863d714b
Use rake/clean
14年前
Michael Jackson
65eb4220ca
Fix indentation
14年前
Michael Jackson
3bbe1ab9d8
Fix rendering partials w/o data
Thanks drobbins (see https://github.com/janl/mustache.js/pull/113 )
14年前
Michael Jackson
93dd0ddb91
Consistent use of typeof
14年前
Michael Jackson
a20cf0032b
Consistent spacing
14年前
Michael Jackson
f44254cc7e
Use native String#trim when available
Uses a method similar to jQuery.trim in jQuery 1.7.1.
14年前
Michael Jackson
ff543bb74d
Use native Array.isArray when available
14年前
Michael Jackson
ae5f8aded0
Ignore .rvmrc
14年前
Michael Jackson
486cbd6870
Merge pull request #130 from tmcw/commonjs-wrap
Condition module.exports to make commonjs version work in browsers and no
14年前
Jan Lehnardt
d8f2f553c4
bump ruby version
14年前
Jan Lehnardt
470b02798c
fix apt-get install name for spidermonkey, again, again, again
14年前
Jan Lehnardt
bdad747916
fix apt-get install name for spidermonkey, again, again
14年前
Jan Lehnardt
f39b87fd78
fix apt-get install name for spidermonkey, again
14年前
Jan Lehnardt
390434107f
fix apt-get install name for spidermonkey
14年前
Jan Lehnardt
a552540526
add travis ci config
14年前
Jan Lehnardt
d0cd6d0e6e
Merge pull request #137 from BigBlueHat/narrow_rspec_dependency
Narrow rspec dependency
14年前
Jan Lehnardt
2ead28a60e
Merge pull request #134 from brandonpayton/master
Dot notation support renders 0 and boolean false values as "true"
14年前
Jan Lehnardt
e2e29b281a
Merge pull request #138 from timcharper/master
README: Dereferencing section clarification + describe dot notation
14年前
Tim Harper
68ad470561
README: Adds a note about dot notation
14年前
Tim Harper
3ca6d1d435
README: Clarify Deferencing Section docs
It was confusing to present the concept of dereferencing a nested object and
enumerating over a list in an same example intended to show dereferencing a
nested object. I believe this example illustrates the concept more clearly.
14年前