Parcourir la source

Merge 445e70e0cc into 23beb3a880

pull/526/merge
kyl3r92 GitHub il y a 9 ans
Parent
révision
8f76b1049d
3 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. +4
    -2
      mustache.js
  2. +0
    -1
      test/spec
  3. +1
    -0
      wrappers/jquery/mustache.js.pre

+ 4
- 2
mustache.js Voir le fichier

@@ -57,6 +57,7 @@
return !testRegExp(nonSpaceRe, string); return !testRegExp(nonSpaceRe, string);
} }


// Urlencoding / escaping map
var entityMap = { var entityMap = {
'&': '&', '&': '&',
'<': '&lt;', '<': '&lt;',
@@ -67,13 +68,14 @@
'`': '&#x60;', '`': '&#x60;',
'=': '&#x3D;' '=': '&#x3D;'
}; };

// Escapes urls
function escapeHtml (string) { function escapeHtml (string) {
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) { return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) {
return entityMap[s]; return entityMap[s];
}); });
} }
var whiteRe = /\s*/; var whiteRe = /\s*/;
var spaceRe = /\s+/; var spaceRe = /\s+/;
var equalsRe = /\s*=/; var equalsRe = /\s*=/;


+ 0
- 1
test/spec

@@ -1 +0,0 @@
Subproject commit 72233f3ffda9e33915fd3022d0a9ebbcce265acd

+ 1
- 0
wrappers/jquery/mustache.js.pre Voir le fichier

@@ -5,5 +5,6 @@ Shameless port of a shameless port
See http://github.com/defunkt/mustache for more info. See http://github.com/defunkt/mustache for more info.
*/ */
// This seems useless and not valid js syntax @TODO
;(function($) { ;(function($) {



Chargement…
Annuler
Enregistrer