修复xss的问题,使用a标签代替js跳转

This commit is contained in:
virusdefender committed 2016-04-13 11:27:46 +08:00
1 parent 17131e8085
commit 20b51b70c3
2 files changed
+10 -4

No files matched your search

+3 -4
View File
@@ -77,10 +77,9 @@
</div>
<ul class="list-group">
{% for item in tags %}
<li class="list-group-item problem-tag"
onclick="location.href='/problems/?tag={{ item.name }}'">
<span class="badge">{{ item.problem_number }}</span>
{{ item.name }}
<li class="list-group-item problem-tag">
<a href="/problems/?tag={{ item.name }}">{{ item.name }}</a>
<span class="badge">{{ item.problem_number }}</span>
</li>
{% endfor %}
</ul>