1.1 --- a/examples/Common/Form/__init__.py Sat Sep 18 17:31:42 2004 +0000
1.2 +++ b/examples/Common/Form/__init__.py Sat Sep 18 17:49:37 2004 +0000
1.3 @@ -62,33 +62,57 @@
1.4 </head>
1.5 <body>
1.6 <h1>Form Test</h1>
1.7 - <h2>Normal</h2>
1.8 - <form method="post" action="">
1.9 - <input name="x" type="text" value="1"/><br/>
1.10 - <input name="x" type="text" value="2"/><br/>
1.11 - <input name="y" type="text" value="3"/><br/>
1.12 - <input name="f" type="file"/><br/>
1.13 - <input name="send" type="submit" value="Send!"/>
1.14 - </form>
1.15 - <h2>Multipart</h2>
1.16 - <form method="post" action="" enctype="multipart/form-data">
1.17 - <input name="x" type="text" value="1"/><br/>
1.18 - <input name="x" type="text" value="2"/><br/>
1.19 - <input name="y" type="text" value="3"/><br/>
1.20 - <input name="f" type="file"/><br/>
1.21 - <input name="send" type="submit" value="Send!"/>
1.22 - </form>
1.23 - <h2>Content Type</h2>
1.24 - <p>%s</p>
1.25 - <h2>Charset</h2>
1.26 - <h3>From Content Type</h3>
1.27 - <p>%s</p>
1.28 - <h3>In Use</h3>
1.29 - <p>%s</p>
1.30 - <h2>Fields from Body</h2>
1.31 - <ul>%s</ul>
1.32 - <h2>Fields from Body and Path</h2>
1.33 - <ul>%s</ul>
1.34 + <table border="1" cellspacing="0" cellpadding="5">
1.35 + <tr>
1.36 + <th>Normal</th>
1.37 + <th>Multipart</th>
1.38 + </tr>
1.39 + <tr>
1.40 + <td>
1.41 + <form method="post" action="">
1.42 + <input name="x" type="text" value="1"/><br/>
1.43 + <input name="x" type="text" value="2"/><br/>
1.44 + <input name="y" type="text" value="3"/><br/>
1.45 + <input name="f" type="file"/><br/>
1.46 + <input name="send" type="submit" value="Send!"/>
1.47 + </form>
1.48 + </td>
1.49 + <td>
1.50 + <form method="post" action="" enctype="multipart/form-data">
1.51 + <input name="x" type="text" value="1"/><br/>
1.52 + <input name="x" type="text" value="2"/><br/>
1.53 + <input name="y" type="text" value="3"/><br/>
1.54 + <input name="f" type="file"/><br/>
1.55 + <input name="send" type="submit" value="Send!"/>
1.56 + </form>
1.57 + </td>
1.58 + </tr>
1.59 + <tr>
1.60 + <th rowspan="2">Content Type</th>
1.61 + <th colspan="2">Charset</th>
1.62 + </tr>
1.63 + <tr>
1.64 + <th>From Content Type</th>
1.65 + <th>In Use</th>
1.66 + </tr>
1.67 + <tr>
1.68 + <td>%s</td>
1.69 + <td>%s</td>
1.70 + <td>%s</td>
1.71 + </tr>
1.72 + <tr>
1.73 + <th>Fields from Body</th>
1.74 + <th>Fields from Body and Path</th>
1.75 + </tr>
1.76 + <tr>
1.77 + <td>
1.78 + <ul>%s</ul>
1.79 + </td>
1.80 + <td>
1.81 + <ul>%s</ul>
1.82 + </td>
1.83 + </tr>
1.84 + </table>
1.85 </body>
1.86 </html>
1.87 """ % (
1.88 @@ -107,7 +131,7 @@
1.89
1.90 def _format_list(self, l):
1.91 return "".join([
1.92 - "<li>%s</li>" % (value or "<em>empty</em>")
1.93 + "<li>%s</li>" % (value.replace("&", "&").replace("<", "<").replace(">", ">") or "<em>empty</em>")
1.94 for value in l
1.95 ])
1.96