diff options
Diffstat (limited to 'demos/quickstart/protected/pages/Controls')
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page | 12 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.php | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page index 4a9b58a3..c8315e42 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page @@ -60,6 +60,18 @@ Text box's behavior upon postback: <com:TButton Text="Submit" Click="submitText" />
</td></tr>
+<tr><td class="samplenote">
+Safety feature (cross-site scripting prevention):
+</td><td class="sampleaction">
+<com:TTextBox
+ ID="TextBox2"
+ AutoPostBack="true"
+ Text="<a href=javascript:xxx>test</a>"
+ Width="200px"/>
+<b>SafeText:</b>
+<com:TLabel BackColor="silver" ID="Output" Text=<%#$this->Page->TextBox2->SafeText%> />
+</td></tr>
+
</table>
<h2>Password Text Boxes</h2>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.php index e3160ead..30add74c 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.php @@ -2,6 +2,12 @@ class Home extends TPage
{
+ protected function onLoad($param)
+ {
+ parent::onLoad($param);
+ $this->Output->dataBind();
+ }
+
public function textChanged($sender,$param)
{
$sender->Text="text changed";
|