diff options
Diffstat (limited to 'ws2a')
| -rw-r--r-- | ws2a/bugs.html | 12 | ||||
| -rw-r--r-- | ws2a/bugsload.js | 12 |
2 files changed, 21 insertions, 3 deletions
diff --git a/ws2a/bugs.html b/ws2a/bugs.html index b5ab100..67ec743 100644 --- a/ws2a/bugs.html +++ b/ws2a/bugs.html @@ -31,7 +31,7 @@ <div class="header clearfix"> <nav> <ul class="nav nav-pills pull-right"> - <li role="presentation"><a href="">Home</a></li> + <li role="presentation"><a href="./index.html">Home</a></li> <li role="presentation" class="active"><a href="./bugs.html">Bugs</a></li> <li role="presentation"><a href="./help.html">Help</a></li> </ul> @@ -41,8 +41,16 @@ <h2 class="sub-header">Recently submitted bugs</h2> <div class="table-responsive"> - <table class="table table-striped" id="bugstable"> + <table class="table table-striped"> <thead> + <tr> + <th>Submitter</th> + <th>Date Submitted</th> + <th>Status</th> + <th>Description</th> + </tr> + </thead> + <tbody id="bugstable"> </tbody> </table> diff --git a/ws2a/bugsload.js b/ws2a/bugsload.js index 4c8b007..1212e15 100644 --- a/ws2a/bugsload.js +++ b/ws2a/bugsload.js @@ -1,8 +1,18 @@ +function htmlEscape(str) { + return String(str) + .replace(/&/g, '&') + .replace(/"/g, '"') + .replace(/'/g, ''') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/\//g, '/'); +} + function loadLastBugs() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { - document.getElementById("bugstable").innerHTML = xhttp.responseText; + document.getElementById("bugstable").innerHTML = htmlEscape(xhttp.responseText); } }; xhttp.open("GET", "/cgi-bin/bugsdata.cgi", true); |
