From 470fa55e5d52e4304504d6e9c7d70a979e090eee Mon Sep 17 00:00:00 2001 From: Justin Schultz Date: Mon, 11 Apr 2016 10:57:46 -0600 Subject: Make the Repo Name and Repo Description XSS safe https://i.gyazo.com/f6b91ea18787cf6f4fbce8057f5f5a28.png and https://i.gyazo.com/8655ad7115dfe078854fa109bd4dba90.png --- assets/js/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index 2948c37..f84b64e 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -40,10 +40,13 @@ function HubTab() { var html = ''; $(repositories).each(function (index, repository) { + // Make the name and description XSS safe + var repFullName = $('
').text(repository.full_name).html(); + var repFullDesc = $('
').text(repository.description).html(); html += '
' + - '' + - '

' + repository.description + '

' + + '' + + '

' + repFullDesc + '

' + '