From 3192eb5cafef46ed5203a8cb2f7ae885e5693a47 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Mon, 27 Mar 2006 03:40:01 +0000
Subject: Added demos for TExpression, TStatements, TSafeHtml and
TTextHighlighter.
---
.../protected/pages/Controls/Expression.page | 2 ++
.../protected/pages/Controls/SafeHtml.page | 19 ++++++++++++++
.../pages/Controls/Samples/TExpression/Home.page | 21 ++++++++++++++++
.../pages/Controls/Samples/TSafeHtml/Home.page | 25 +++++++++++++++++++
.../pages/Controls/Samples/TStatements/Home.page | 29 ++++++++++++++++++++++
.../Controls/Samples/TTextHighlighter/Home.page | 29 ++++++++++++++++++++++
.../protected/pages/Controls/Standard.page | 2 +-
.../protected/pages/Controls/Statements.page | 2 ++
.../protected/pages/Controls/TextHighlighter.page | 12 +--------
9 files changed, 129 insertions(+), 12 deletions(-)
create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page
create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page
create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page
create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
(limited to 'demos/quickstart/protected/pages/Controls')
diff --git a/demos/quickstart/protected/pages/Controls/Expression.page b/demos/quickstart/protected/pages/Controls/Expression.page
index efa1ab7a..c87f0ba4 100644
--- a/demos/quickstart/protected/pages/Controls/Expression.page
+++ b/demos/quickstart/protected/pages/Controls/Expression.page
@@ -27,4 +27,6 @@ The context of the expression in a TExpression control is the control i
Be aware, since TExpression allows execution of arbitrary PHP code, in general you should not use it to evaluate expressions submitted by your application users.
+
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/SafeHtml.page b/demos/quickstart/protected/pages/Controls/SafeHtml.page
index 16561672..565c8251 100644
--- a/demos/quickstart/protected/pages/Controls/SafeHtml.page
+++ b/demos/quickstart/protected/pages/Controls/SafeHtml.page
@@ -3,4 +3,23 @@
TSafeHtml
+
+TSafeHtml is a control that strips down all potentially dangerous HTML content. It is mainly a wrapper of the SafeHTML project. According to the SafeHTML project, it tries to safeguard the following situations when the string is to be displayed to end-users:
+
+
+ - Opening tag without its closing tag
+ - closing tag without its opening tag
+
- any of these tags: base, basefont, head, html, body, applet, object, iframe, frame, frameset, script, layer, ilayer, embed, bgsound, link, meta, style, title, blink, xml, etc.
+ - any of these attributes: on*, data*, dynsrc
+ - javascript:/vbscript:/about: etc. protocols
+ - expression/behavior etc. in styles
+ - any other active content.
+
+
+
+To use TSafeHtml, simply enclose the content to be secured within the TSafeHtml component tag in a template. The content may consist of both static text and PRADO controls. If the latter, the rendering result of the controls will be secured.
+
+
+
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page
new file mode 100644
index 00000000..2273f3c1
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page
@@ -0,0 +1,21 @@
+
+
+TExpression Sample
+
+
+
+
+Using expression component tag:
+ |
+
+ |
+
+
+Using shortcut expression tag:
+ |
+<%= $this->Page->PagePath %>
+ |
+
+
+
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page
new file mode 100644
index 00000000..88f8e162
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page
@@ -0,0 +1,25 @@
+
+
+TSafeHtml Samples
+
+
+
+
+Safeguard a static string:
+ |
+
+ javascript link stripped
+
+ |
+
+
+Safeguard the control rendering results:
+ |
+
+
+
+ |
+
+
+
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page
new file mode 100644
index 00000000..66734ce0
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page
@@ -0,0 +1,29 @@
+
+
+TStatements Sample
+
+
+
+
+Using TStatements component tag:
+ |
+
+
+ $uid=$this->UniqueID;
+ echo "UniqueID is '$uid'.";
+
+
+ |
+
+
+Using shortcut statements tag:
+ |
+<%%
+ $uid=$this->UniqueID;
+ echo "UniqueID is '$uid'.";
+%>
+ |
+
+
+
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
new file mode 100644
index 00000000..f220ce84
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
@@ -0,0 +1,29 @@
+
+
+TTextHighlighter Samples
+
+
+
+
+Highlighting PHP statements:
+ |
+
+
+
+ |
+
+
+Highlighting control rendering results:
+ |
+
+
+
+ |
+
+
+
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Standard.page b/demos/quickstart/protected/pages/Controls/Standard.page
index 11c8eaec..d6070986 100644
--- a/demos/quickstart/protected/pages/Controls/Standard.page
+++ b/demos/quickstart/protected/pages/Controls/Standard.page
@@ -91,7 +91,7 @@
TRadioButton represents a radiobutton on a Web page. It is mainly used in a group from which users make a choice.
- *
+
TSafeHtml displays its body content with assurance that the content contain no harmful code (such as XSS).
diff --git a/demos/quickstart/protected/pages/Controls/Statements.page b/demos/quickstart/protected/pages/Controls/Statements.page
index f37f1dc4..c6807738 100644
--- a/demos/quickstart/protected/pages/Controls/Statements.page
+++ b/demos/quickstart/protected/pages/Controls/Statements.page
@@ -38,4 +38,6 @@ The context of the statements in a TStatements control is the control i
Be aware, since TStatements allows execution of arbitrary PHP code, in general you should not use it to evaluate PHP code submitted by your application users.
+
+
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/TextHighlighter.page b/demos/quickstart/protected/pages/Controls/TextHighlighter.page
index 23c33b75..40806b02 100644
--- a/demos/quickstart/protected/pages/Controls/TextHighlighter.page
+++ b/demos/quickstart/protected/pages/Controls/TextHighlighter.page
@@ -21,16 +21,6 @@ print_r(explode('|', $str, 2)); // will output an array
</com:TTextHighlighter>
-
-The output will look as follows,
-
-
-
-
-
-
+
\ No newline at end of file
--
cgit v1.2.3