Remove unnecessary escapes

This commit is contained in:
James Wang 2016-01-05 02:20:44 +00:00
parent 140733bd33
commit 500462ec00

View file

@ -5,32 +5,32 @@ function render_problems() {
for (var i = 0; i < data.length; i++) {
files = data[i]["files"];
problem =
`<div class=\"panel panel-info\">
<div class=\"panel-heading\">
<h3 class=\"panel-title\">` + data[i]["name"] + ` | ` + data[i]["category"] + `<span style=\"float: right\">` + data[i]["value"] + ` points</span></h3>
`<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">` + data[i]["name"] + ` | ` + data[i]["category"] + `<span style="float: right">` + data[i]["value"] + ` points</span></h3>
</div>
<div class=\"panel-body\">
<div class="panel-body">
<p>` + data[i]["description"] + `</p>
<div class=\"input-group\">
<input type=\"text\" class=\"form-control\" placeholder=\"Flag\">
<span class=\"input-group-btn\">
<button class=\"btn btn-success\" id=\"hint\" type=\"button\" onclick=\"show_hint(\'` + data[i]["pid"] + `\');\">Hint</button>
<button class=\"btn btn-success\" type=\"button\">Submit!</button>
<div class="input-group">
<input type="text" class="form-control" placeholder="Flag">
<span class="input-group-btn">
<button class="btn btn-success" id="hint" type="button" onclick="show_hint(\'` + data[i]["pid"] + `\');">Hint</button>
<button class="btn btn-success" type="button">Submit!</button>
</span>
</div>
</div>
<div class=\"panel-footer\">`
<div class="panel-footer">`
for (var j = 0; j < files.length; j++) {
file_name = files[j].split("/").pop();
problem +=
`<a href=\"` + files[j] + `\" class=\"filelink\" target=\"_blank\">
<h4 class=\"probfile\">` + file_name + `</h4>
`<a href="` + files[j] + `" class="filelink" target="_blank">
<h4 class="probfile">` + file_name + `</h4>
</a>`
}
problem += `<br>
<div id=\"hint_` + data[i]["pid"] + `\" style=\"display:none\">` + data[i]["hint"] + `</div>
<div id="hint_` + data[i]["pid"] + `" style="display:none">` + data[i]["hint"] + `</div>
</div></div>`
$("#problems").append(problem);
}