escaping a string for js; refs #19

This commit is contained in:
Radek Stepan 2013-08-02 22:41:16 +01:00
parent 236e91abb2
commit 2cd2ce74e5
2 changed files with 9 additions and 10 deletions

View File

@ -1,14 +1,13 @@
{ {
"name": "github-burndown-chart", "name": "github-burndown-chart",
"version": "0.2.0", "version": "0.2.1",
"private": true,
"dependencies": { "dependencies": {
"coffee-script": "1.3.3", "coffee-script": "~1.6.3",
"flatiron": "0.2.5", "flatiron": "~0.3.8",
"union": "0.3.4", "union": "~0.3.7",
"connect": "2.4.3", "connect": "~2.8.4",
"eco": "1.1.0-rc-3", "eco": "~1.1.0-rc-3",
"js-yaml": "1.0.3" "js-yaml": "~2.1.0"
}, },
"scripts": { "scripts": {
"start": "start.js" "start": "start.js"

View File

@ -68,7 +68,7 @@
<script> <script>
(function() { (function() {
var now = new Date().getTime(); var now = + new Date;
var ideal = [], actual = [], issues = {}, i = 0; var ideal = [], actual = [], issues = {}, i = 0;
<% for day, data of @days: %> <% for day, data of @days: %>
@ -79,7 +79,7 @@
<% if data['issues'].length > 0: %> <% if data['issues'].length > 0: %>
issues[<%= day %>] = []; issues[<%= day %>] = [];
<% for issue in data['issues']: %> <% for issue in data['issues']: %>
issues[<%= day %>].push('<%= issue['title'] %>'); issues[<%= day %>].push('<%= escape issue['title'] %>');
<% end %> <% end %>
<% end %> <% end %>