Skip to content

Commit 2e3df14

Browse files
C0deH4ckerColdHeat
authored andcommitted
Fix display of team websites with https:// prefixes (CTFd#209)
1 parent 935027c commit 2e3df14

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CTFd/templates/admin/teams.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ <h2 class="text-center">Edit User</h2>
128128
<td class="team-name"><a href="{{ request.script_root }}/admin/team/{{ team.id }}">{{ team.name | truncate(32) }}</a>
129129
</td>
130130
<td class="team-email">{{ team.email | truncate(32) }}</td>
131-
<td class="team-website">{% if team.website and team.website.startswith('http') %}<a href="{{ team.website }}">{{ team.website | truncate(32) }}</a>{% endif %}
131+
<td class="team-website">{% if team.website and (team.website.startswith('http://') or team.website.startswith('https://')) %}<a href="{{ team.website }}">{{ team.website | truncate(32) }}</a>{% endif %}
132132
</td>
133133
<td class="team-affiliation"><span>{% if team.affiliation %}{{ team.affiliation | truncate(20) }}{% endif %}</span>
134134
</td>

CTFd/templates/original/teams.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Teams</h1>
2323
{% for team in teams %}
2424
<tr>
2525
<td><a href="{{ request.script_root }}/team/{{ team.id }}">{{ team.name }}</a></td>
26-
<td>{% if team.website and team.website.startswith('http://') %}<a href="{{ team.website }}">{{ team.website }}</a>{% endif %}</td>
26+
<td>{% if team.website and (team.website.startswith('http://') or team.website.startswith('https://')) %}<a href="{{ team.website }}">{{ team.website }}</a>{% endif %}</td>
2727
<td><span>{% if team.affiliation %}{{ team.affiliation }}{% endif %}</span></td>
2828
<td class="hidden-xs"><span>{% if team.country %}{{ team.country }}{% endif %}</span></td>
2929
</tr>

0 commit comments

Comments
 (0)