Here
This commit is contained in:
parent
c619e27607
commit
6841a5e5d8
2 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@
|
||||||
var x = parseInt(Math.random() * 100000);
|
var x = parseInt(Math.random() * 100000);
|
||||||
c.innerHTML = [
|
c.innerHTML = [
|
||||||
'<div id="gitstatus_' + x + '"></div>\n',
|
'<div id="gitstatus_' + x + '"></div>\n',
|
||||||
'<script type="text/javascript" src=""></script>\n',
|
'<script type="text/javascript" src="http://ryanmcgrath.github.com/gitstatus/js/gitstatus.min.js"></script>\n',
|
||||||
'<script type="text/javascript">\n',
|
'<script type="text/javascript">\n',
|
||||||
'new GitStatus({\n',
|
'new GitStatus({\n',
|
||||||
' id: "gitstatus_' + x + '",\n',
|
' id: "gitstatus_' + x + '",\n',
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
* @returns String, parsed/replaced template.
|
* @returns String, parsed/replaced template.
|
||||||
*/
|
*/
|
||||||
render: function(template, context) {
|
render: function(template, context) {
|
||||||
for(x in context) template = template.replace(new RegExp('{{' + x + '}}', 'g'), context[x]);
|
for(x in context) template = template.replace(new RegExp('{{' + x + '}}', 'g'), context[x].replace('<', '<').replace('>', '>'));
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Reference in a new issue