[pastebot-cvs] pastebot/Server Web.pm,1.18,1.19
Status: Beta
Brought to you by:
rcaputo
From: <to...@us...> - 2003-12-05 05:41:42
|
Update of /cvsroot/pastebot/pastebot/Server In directory sc8-pr-cvs1:/tmp/cvs-serv8288/Server Modified Files: Web.pm Log Message: HTML escape the channel names in the drop-down list. Select the only channel as the default (instead of '(None)') if there is only one channel. Index: Web.pm =================================================================== RCS file: /cvsroot/pastebot/pastebot/Server/Web.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Web.pm 13 Nov 2003 23:59:34 -0000 1.18 --- Web.pm 5 Dec 2003 05:41:39 -0000 1.19 *************** *** 422,427 **** if (@channels) { - @channels = map { "<option value='$_'>$_" } @channels; @channels = sort @channels; } unshift(@channels, "<option value=''>(none)"); --- 422,429 ---- if (@channels) { @channels = sort @channels; + @channels = map { "<option value='$_'>$_" } + map html_encode($_), @channels; + $channels[0] =~ s/\'\>/\' selected="selected">/ if @channels == 1; } unshift(@channels, "<option value=''>(none)"); |