diff --git a/github_jsonp.php b/github_jsonp.php index 57fcd19..77e2990 100644 --- a/github_jsonp.php +++ b/github_jsonp.php @@ -10,12 +10,7 @@ // Get the url of to be proxied // Is it a POST or a GET? -# Lifted from Symfony -function escape_javascript($javascript = '') { - $javascript = preg_replace('/\r\n|\n|\r/', "\\n", $javascript); - $javascript = preg_replace('/(["\'])/', '\\\\\1', $javascript); - return $javascript; -} +# This script requires PHP5.2 (for the json_encode method); $url = ($_POST['url']) ? $_POST['url'] : $_GET['url']; diff --git a/javascripts/f.js b/javascripts/f.js index 57a5a3b..cd98464 100644 --- a/javascripts/f.js +++ b/javascripts/f.js @@ -137,7 +137,7 @@ window.F = Class.create({ ); } commitsHTML.push(''); - + var html = [ '
Name: ', '', - text[i] ? text[i] : '
', + text[i] ? text[i].replace('<', '<').replace('>', '>') : '
', '
' ].join('')); diff --git a/javascripts/gh.js b/javascripts/gh.js index a7a333a..5d2a3fc 100644 --- a/javascripts/gh.js +++ b/javascripts/gh.js @@ -1,13 +1,14 @@ +window.AR = Ajax.JSONRequest; + window.GH = { hash: {} - ,proxy: 'http://marrilydev.com/misc/githubfinder/github_jsonp.php?url=' + ,proxy: 'http://hoavui.com/github_jsonp.php?url=' ,api: 'http://github.com/api/v2/json' ,Commits: { listBranch: function(user_id, repository, branch, options ) { options = Object.extend({ onSuccess: function(response) { - debugger var commits = eval('(' + response.responseText +')'); onData( commits ); }