From 476e6b22398b63ba4b3806304104163128e7a742 Mon Sep 17 00:00:00 2001 From: antzucaro Date: Mon, 27 Jun 2011 21:49:06 -0400 Subject: [PATCH] Fix nick escaping problem by appending |n to disable filtering. --- xonstat/templates/game_info.mako | 2 +- xonstat/templates/main_index.mako | 2 +- xonstat/templates/player_game_index.mako | 4 ++-- xonstat/templates/player_index.mako | 2 +- xonstat/templates/player_info.mako | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xonstat/templates/game_info.mako b/xonstat/templates/game_info.mako index fb15492..c8e54f4 100755 --- a/xonstat/templates/game_info.mako +++ b/xonstat/templates/game_info.mako @@ -28,7 +28,7 @@ ${scoreboard(game.game_type_cd, pgstats)}

Accuracy

% for pgstat in pgstats: % if pgstat.player_game_stat_id in pwstats: -Accuracy for ${pgstat.nick_html_colors()}: +Accuracy for ${pgstat.nick_html_colors()|n}: ${accuracy(pwstats[pgstat.player_game_stat_id][0:5])}

diff --git a/xonstat/templates/main_index.mako b/xonstat/templates/main_index.mako index 24eb827..01e4868 100755 --- a/xonstat/templates/main_index.mako +++ b/xonstat/templates/main_index.mako @@ -21,7 +21,7 @@ Main Page - ${parent.title()} ${i} % if player_id != '-': - ${nick} + ${nick|n} % else: ${nick} % endif diff --git a/xonstat/templates/player_game_index.mako b/xonstat/templates/player_game_index.mako index 0ace35d..60cbd3d 100755 --- a/xonstat/templates/player_game_index.mako +++ b/xonstat/templates/player_game_index.mako @@ -1,14 +1,14 @@ <%inherit file="base.mako"/> <%block name="title"> -Player Game Index for ${player.nick_html_colors()} - ${parent.title()} +Player Game Index for ${player.nick_html_colors()|n} - ${parent.title()} % if not games:

Sorry, no games yet. Get playing, scrub!

% else: -

Recent Games by ${player.nick_html_colors()}

+

Recent Games by ${player.nick_html_colors()|n}

% for (playergamestat, game, server, map) in games:
  • #${game.game_id}: ${map.name}
  • % endfor diff --git a/xonstat/templates/player_index.mako b/xonstat/templates/player_index.mako index 03f52b9..7041705 100755 --- a/xonstat/templates/player_index.mako +++ b/xonstat/templates/player_index.mako @@ -18,7 +18,7 @@ Player Index - ${parent.title()} % for player in players: ${player.player_id} - ${player.nick_html_colors()} + ${player.nick_html_colors()|n} ${player.create_dt.strftime('%m/%d/%Y at %H:%M')} % endfor diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index e4147b9..615716c 100755 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -31,7 +31,7 @@ ${parent.title()}

    Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!

    % else: -

    ${player.nick_html_colors()}

    +

    ${player.nick_html_colors()|n}

    Member Since: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')}
    Last Seen: ${recent_games[0][1].fuzzy_date()}
    @@ -112,5 +112,5 @@ ${accuracy(weapon_stats)} % endfor -More games played by ${player.nick_html_colors()}... +More games played by ${player.nick_html_colors()|n}... % endif -- 2.39.2