��
��Pc@s�dZddkZddkZddkZddkZddklZddklZddkTddk l
Z
ddklZddkl
Z
dd klZdd
klZeiZd�Zd�Zd
�ZdS(sCScript which implements admin editing of the list's html templates.i����N(tUtils(tMailList(t*(t
HTMLFormatter(tErrors(tAuth(tsyslog(ti18nc
Csd�}d|d�fd|d�fd|d�fd|d �ff}ti}t�}titi�|iti�ti�}|p,|it d
|d���|i
�GHdS|di�}yti|d
d�}Wnbt
ij
oS}ti|�}|it d
|d���|i
�GHtdd||�dSXti|i�|i|i�ti�}|ititif|idd��pV|id�o%ttd|d���i
�} nd} ti|dd| �dS|i}
t|�djo�|d}x|D]=\}}
||jo$||
�}|i|d��Pq$q$Wti|�}|i|d��|it d
|d���|i|i ��|i
�GHdSn�|i|d��|it d|d���|it d
|d���t!�}xG|D]?\}}
t"|i#d�d|||
��}|i|�q$W|itd |��|i|i ��|i
�GHdSz;|i$�ot%||||�nt&||||�Wd|i|i ��|i
�GHXdS(!NcSs|S(N((ts((s]/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Cgi/edithtml.pyt_)ss
listinfo.htmlsGeneral list information pagessubscribe.htmlsSubscribe results pagesoptions.htmlsUser specific options pagessubscribeack.txtsWelcome email text fileisList name is required.itlocks&No such list <em>%(safelistname)s</em>terrorsNo such list "%s": %stadminpwttadmlogins+1sAuthorization failed.tadmintmsgis/%(realname)s -- Edit html for %(template_info)ssEdit HTML : Errors&%(safetemplatename)s: Invalid templates!%(realname)s -- HTML Page EditingsSelect page to edit:tedithtmlt/s+2('RR tDocumenttset_languagetmm_cfgtDEFAULT_SERVER_LANGUAGERt
GetPathPiecestAddItemtHeadertFormattlowerRRtMMListErrortwebsafeRtpreferred_languagetcgitFieldStoragetWebAuthenticatet
AuthListAdmint
AuthSiteAdmintgetvaluethas_keytBoldtFontSizeRt loginpaget real_nametlentSetTitletGetMailmanFootert
UnorderedListtLinktGetScriptURLtkeyst
ChangeHTMLt
FormatHTML(R t
template_datatdoctpartstlistnametmlisttetsafelistnametcgidataRtrealnamet
template_namettemplatetinfot
template_infotsafetemplatenamet
template_listtl((s]/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Cgi/edithtml.pytmain&s� %
&
cCs,|itdd|i��|itd|��|id�t|id�td��}|itd|��|id�|id�t|id�d |�}ti |d
dd|�}|it
d|d
ddd��|idtd��|itdtd���|i|�dS(Nis%s:s<hr>Rs0View or edit the list configuration information.s+1s<p>RRtrawR7t html_codetrowsi(tcolsiKs#When you are done making changes...tsubmitsSubmit Changes(RRR)R.R/R R'tFormRtmaketexttTextAreatSubmitButton(R7R4R<R?tlinktformttext((s]/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Cgi/edithtml.pyR2�s
"c Cs�|id�pJ|itdtd���|itdtd���|id�dS|di}ti|�oy|itdtd���|itd��|itdtd ���|itdtd
���|id�dSti i
|i�|i�}ti
d�}zJyti|d�Wn/tj
o#}|itijo�qfnXWdti
|�Xtti i
||�d
�}z|i|�Wd|i�X|itdtd���|id�dS(NREisCan't have empty html page.sHTML Unchanged.s<hr>s
The page you saved contains suspicious HTML that could
potentially expose your users to cross-site scripting attacks. This change
has therefore been rejected. If you still want to make these changes, you
must have shell access to your Mailman server.
sSee shttp://wiki.list.org/x/jYA9s FAQ 4.48.sPage Unchanged.ii�twsHTML successfully updated.(R%RRR tvalueRtsuspiciousHTMLR.tostpathtjointfullpathRtumasktmkdirtOSErrorterrnotEEXISTtopentwritetclose( R7tcgi_infoR<R4tcodetlangdirtomaskR8tfp((s]/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Cgi/edithtml.pyR1�s@
(t__doc__RSRRZtretMailmanRRtMailman.htmlformattMailman.HTMLFormatterRRtMailman.CgiRtMailman.Logging.SyslogRRR RCR2R1(((s]/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Cgi/edithtml.pyt<module>s
`