Permalink
Browse files

restoring some accidentally killed semi-colons

  • Loading branch information...
1 parent 172fe5a commit c4d7c1562435f4b6e1d588b8530f91e19c1b43f4 @amccollum committed Nov 19, 2011
Showing with 13 additions and 12 deletions.
  1. +2 −1 Cakefile
  2. +1 −1 lib/ender.js
  3. +4 −4 lib/wings.js
  4. +1 −1 src/test/wings-test.coffee
  5. +1 −1 src/wings/ender.coffee
  6. +4 −4 src/wings/wings.coffee
View
3 Cakefile
@@ -1,5 +1,4 @@
fs = require('fs')
-sys = require('sys')
{spawn, exec} = require('child_process')
package = JSON.parse(fs.readFileSync('package.json', 'utf8'))
@@ -29,7 +28,9 @@ task 'test', 'Build and run the test suite', ->
'pushd test',
'ln -sfh ../node_modules node_modules',
+ 'ln -sfh .. node_modules/wings',
#'node_modules/.bin/ender build ender-vows ..',
'node_modules/.bin/vows *-test.js',
+ 'unlink node_modules/wings',
'popd test',
]
View
2 lib/ender.js
@@ -1,4 +1,4 @@
-!(function($) {
+(function($) {
var renderTemplate;
renderTemplate = require('wings').renderTemplate;
$.ender({
View
8 lib/wings.js
@@ -1,4 +1,4 @@
-!(function(wings) {
+(function(wings) {
var escapeXML, isArray, parse_re, renderRawTemplate, replaceBraces, restoreBraces, _ref;
wings.strict = false;
wings.renderTemplate = function(template, data, links) {
@@ -20,13 +20,13 @@
return s.toString().replace(/&(?!\w+;)|["<>]/g, function(s) {
switch (s) {
case '&':
- return '&amp';
+ return '&amp;';
case '"':
return '\"';
case '<':
- return '&lt';
+ return '&lt;';
case '>':
- return '&gt';
+ return '&gt;';
default:
return s;
}
View
2 src/test/wings-test.coffee
@@ -69,7 +69,7 @@ vows.add 'templates'
topic: t('This shouldn\'t produce html: {html}', {html: '<b>bolded</b>'})
'should escape the html reserved characters': (topic) ->
- equal topic, 'This shouldn\'t produce html: &ltb&gtbolded&lt/b&gt'
+ equal topic, 'This shouldn\'t produce html: &lt;b&gt;bolded&lt;/b&gt;'
'a template with unescaped tags':
topic: t('This should produce html: {&html}', {html: '<b>bolded</b>'})
View
2 src/wings/ender.coffee
@@ -1,4 +1,4 @@
-!(($) ->
+(($) ->
renderTemplate = require('wings').renderTemplate
$.ender({renderTemplate: renderTemplate})
$.ender({
View
8 src/wings/wings.coffee
@@ -1,4 +1,4 @@
-!((wings) ->
+((wings) ->
wings.strict = false
wings.renderTemplate = (template, data, links) ->
@@ -16,10 +16,10 @@
escapeXML = (s) ->
return s.toString().replace /&(?!\w+;)|["<>]/g, (s) ->
switch s
- when '&' then return '&amp'
+ when '&' then return '&amp;'
when '"' then return '\"'
- when '<' then return '&lt'
- when '>' then return '&gt'
+ when '<' then return '&lt;'
+ when '>' then return '&gt;'
else return s
parse_re = ///

0 comments on commit c4d7c15

Please sign in to comment.