From 0f3a577bed4d828472469675e90fcab032e33f44 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Fri, 2 Jun 2006 18:27:02 +0000
Subject: merge from 3.0 branch till 1133.
---
.gitattributes | 104 +-
HISTORY | 1 +
demos/blog/protected/Pages/Admin/ConfigMan.page | 2 +
demos/blog/protected/Pages/Admin/PostMan.page | 2 +
demos/blog/protected/Pages/Admin/UserMan.page | 2 +
demos/blog/protected/Pages/Posts/MyPost.page | 4 +-
demos/blog/themes/Fall/style.css | 5 +
demos/blog/themes/Spring/style.css | 5 +
demos/blog/themes/Summer/style.css | 5 +
demos/blog/themes/Winter/style.css | 5 +
demos/quickstart/protected/application.xml | 1 +
.../quickstart/protected/comments/CommentList.php | 59 +
.../quickstart/protected/comments/CommentList.tpl | 102 +
.../protected/comments/QuickStartComments.php | 175 +
demos/quickstart/protected/comments/comments.db | Bin 0 -> 6144 bytes
demos/quickstart/protected/controls/Layout.tpl | 1 +
.../quickstart/protected/pages/Advanced/I18N.page | 6 +-
demos/quickstart/protected/pages/Comments.page | 46 +
demos/quickstart/protected/pages/Comments.php | 76 +
demos/quickstart/themes/PradoSoft/style.css | 138 +
framework/3rdParty/Markdown/License.text | 34 +
framework/3rdParty/Markdown/MarkdownParser.php | 1257 ++++++
framework/3rdParty/readme.html | 10 +-
framework/I18N/TTranslate.php | 78 +-
framework/Web/Javascripts/datepicker/datepicker.js | 34 +-
framework/Web/Javascripts/js/datepicker.js | 14 +-
framework/Web/Javascripts/js/prado.js | 2 +-
framework/Web/Javascripts/prototype/event.js | 1 +
framework/Web/UI/TTemplateManager.php | 34 +-
framework/Web/UI/WebControls/TDataBoundControl.php | 2 +-
framework/Web/UI/WebControls/TMarkdown.php | 113 +
framework/Web/UI/WebControls/TRepeater.php | 3 +-
.../Web/UI/WebControls/TValidationSummary.php | 17 +-
framework/Web/UI/WebControls/TWizard.php | 6 +-
.../quickstart/Controls/ListBoxTestCase.php | 6 +-
.../quickstart/Controls/MultiViewTestCase.php | 8 +-
tests/FunctionalTests/selenium/SeleneseRunner.html | 97 -
tests/FunctionalTests/selenium/SeleniumLog.html | 61 -
.../selenium/TestRunner-splash.html | 55 -
tests/FunctionalTests/selenium/TestRunner.hta | 146 -
tests/FunctionalTests/selenium/TestRunner.html | 146 -
tests/FunctionalTests/selenium/VERSION.txt | 1 -
tests/FunctionalTests/selenium/build.xml | 109 -
.../selenium/core/SeleneseRunner.html | 111 +
.../FunctionalTests/selenium/core/SeleniumLog.html | 79 +
.../FunctionalTests/selenium/core/TestPrompt.html | 93 +
.../selenium/core/TestRunner-splash.html | 55 +
.../FunctionalTests/selenium/core/TestRunner.html | 157 +
.../selenium/core/domviewer/butmin.gif | Bin 0 -> 843 bytes
.../selenium/core/domviewer/butplus.gif | Bin 0 -> 848 bytes
.../selenium/core/domviewer/domviewer.css | 298 ++
.../selenium/core/domviewer/domviewer.html | 16 +
.../selenium/core/domviewer/selenium-domviewer.js | 205 +
.../selenium/core/scripts/find_matching_child.js | 69 +
.../selenium/core/scripts/htmlutils.js | 463 +++
.../selenium/core/scripts/prototype-1.4.0.js | 1781 +++++++++
.../selenium/core/scripts/selenium-api.js | 1402 +++++++
.../selenium/core/scripts/selenium-browserbot.js | 1114 ++++++
.../core/scripts/selenium-browserdetect.js | 115 +
.../core/scripts/selenium-commandhandlers.js | 371 ++
.../core/scripts/selenium-executionloop.js | 266 ++
.../selenium/core/scripts/selenium-logging.js | 112 +
.../core/scripts/selenium-seleneserunner.js | 300 ++
.../selenium/core/scripts/selenium-testrunner.js | 748 ++++
.../selenium/core/scripts/selenium-version.js | 5 +
.../core/scripts/user-extensions.js.sample | 75 +
.../selenium/core/scripts/xmlextras.js | 153 +
.../selenium/core/selenium-logo.png | Bin 0 -> 6714 bytes
tests/FunctionalTests/selenium/core/selenium.css | 211 +
tests/FunctionalTests/selenium/core/xpath/dom.js | 428 ++
tests/FunctionalTests/selenium/core/xpath/misc.js | 255 ++
tests/FunctionalTests/selenium/core/xpath/xpath.js | 2182 ++++++++++
tests/FunctionalTests/selenium/doc/FAQ.html | 128 -
tests/FunctionalTests/selenium/doc/FAQ.txt | 127 -
tests/FunctionalTests/selenium/doc/contact.html | 23 -
.../selenium/doc/developingdrivers.html | 134 -
tests/FunctionalTests/selenium/doc/driven.html | 206 -
tests/FunctionalTests/selenium/doc/home-page.html | 161 -
.../selenium/doc/images/Adjacent.png | Bin 39287 -> 0 bytes
.../selenium/doc/images/Embedded.png | Bin 30678 -> 0 bytes
.../selenium/doc/images/SmallAdjacent.png | Bin 12067 -> 0 bytes
.../selenium/doc/images/SmallEmbedded.png | Bin 6141 -> 0 bytes
.../selenium/doc/images/SmallStandalone.png | Bin 7336 -> 0 bytes
.../selenium/doc/images/Standalone.png | Bin 38131 -> 0 bytes
.../selenium/doc/images/localhostAut.png | Bin 4474 -> 0 bytes
.../selenium/doc/images/localhostDriver.png | Bin 3865 -> 0 bytes
.../selenium/doc/images/localhostSelenium.png | Bin 3600 -> 0 bytes
.../selenium/doc/images/stockmeister.png | Bin 6514 -> 0 bytes
.../selenium/doc/images/tested-with-selenium.png | Bin 3294 -> 0 bytes
tests/FunctionalTests/selenium/doc/index.html | 30 -
tests/FunctionalTests/selenium/doc/jsrmi.html | 151 -
.../selenium/doc/release-notes.html | 97 -
tests/FunctionalTests/selenium/doc/rst2html.bat | 3 -
.../selenium/doc/seleniumReference.html | 1148 ------
.../selenium/doc/seleniumReference.txt | 771 ----
tests/FunctionalTests/selenium/doc/testRunner.txt | 99 -
tests/FunctionalTests/selenium/doc/testrunner.html | 213 -
tests/FunctionalTests/selenium/doc/usage.html | 84 -
.../FunctionalTests/selenium/dom-images/butmin.gif | Bin 843 -> 0 bytes
.../selenium/dom-images/butplus.gif | Bin 848 -> 0 bytes
.../selenium/dom-styles/default.css | 298 --
tests/FunctionalTests/selenium/domviewer.html | 16 -
.../selenium/html-xpath/carnation.jpg | Bin 4153 -> 0 bytes
.../selenium/html-xpath/example.html | 75 -
.../selenium/html-xpath/html-xpath-patched.js | 657 ---
.../selenium/html-xpath/html-xpath.js | 610 ---
.../selenium/html-xpath/license.txt | 504 ---
.../selenium/html-xpath/rainbow.jpg | Bin 6085 -> 0 bytes
tests/FunctionalTests/selenium/htmlutils.js | 283 --
tests/FunctionalTests/selenium/index.html | 60 -
tests/FunctionalTests/selenium/install-readme.txt | 9 -
.../selenium/jsmock/mock-tests.html | 205 -
tests/FunctionalTests/selenium/jsmock/mock.js | 124 -
tests/FunctionalTests/selenium/php/TestRunner.php | 214 +-
tests/FunctionalTests/selenium/php/selenium.php | 8 +-
.../selenium/prado-functional-test.js | 41 +
.../selenium/readme-selenium-fitrunner.txt | 46 -
.../selenium/readme-selenium-rpcrunner.txt | 17 -
tests/FunctionalTests/selenium/selenium-api.js | 731 ----
.../selenium/selenium-browserbot.js | 996 -----
.../selenium/selenium-commandhandlers.js | 291 --
.../FunctionalTests/selenium/selenium-domviewer.js | 188 -
.../selenium/selenium-executionloop.js | 234 --
.../FunctionalTests/selenium/selenium-fitrunner.js | 597 ---
tests/FunctionalTests/selenium/selenium-logging.js | 88 -
.../FunctionalTests/selenium/selenium-logo.graffle | 509 ---
tests/FunctionalTests/selenium/selenium-logo.png | Bin 6714 -> 0 bytes
.../selenium/selenium-seleneserunner.js | 172 -
.../selenium/selenium-tableparser.js | 50 -
.../selenium/selenium-testrunner.js | 597 ---
tests/FunctionalTests/selenium/selenium.css | 211 -
.../selenium/user-extensions.js.sample | 62 -
tests/FunctionalTests/selenium/xmlextras.js | 153 -
tests/FunctionalTests/selenium/xpath.js | 4169 --------------------
.../validators/tests/RequiredListTestCase.php | 11 +-
135 files changed, 13471 insertions(+), 16167 deletions(-)
create mode 100644 demos/quickstart/protected/comments/CommentList.php
create mode 100644 demos/quickstart/protected/comments/CommentList.tpl
create mode 100644 demos/quickstart/protected/comments/QuickStartComments.php
create mode 100644 demos/quickstart/protected/comments/comments.db
create mode 100644 demos/quickstart/protected/pages/Comments.page
create mode 100644 demos/quickstart/protected/pages/Comments.php
create mode 100644 framework/3rdParty/Markdown/License.text
create mode 100644 framework/3rdParty/Markdown/MarkdownParser.php
create mode 100644 framework/Web/UI/WebControls/TMarkdown.php
delete mode 100644 tests/FunctionalTests/selenium/SeleneseRunner.html
delete mode 100644 tests/FunctionalTests/selenium/SeleniumLog.html
delete mode 100644 tests/FunctionalTests/selenium/TestRunner-splash.html
delete mode 100644 tests/FunctionalTests/selenium/TestRunner.hta
delete mode 100644 tests/FunctionalTests/selenium/TestRunner.html
delete mode 100644 tests/FunctionalTests/selenium/VERSION.txt
delete mode 100644 tests/FunctionalTests/selenium/build.xml
create mode 100755 tests/FunctionalTests/selenium/core/SeleneseRunner.html
create mode 100755 tests/FunctionalTests/selenium/core/SeleniumLog.html
create mode 100755 tests/FunctionalTests/selenium/core/TestPrompt.html
create mode 100755 tests/FunctionalTests/selenium/core/TestRunner-splash.html
create mode 100755 tests/FunctionalTests/selenium/core/TestRunner.html
create mode 100755 tests/FunctionalTests/selenium/core/domviewer/butmin.gif
create mode 100755 tests/FunctionalTests/selenium/core/domviewer/butplus.gif
create mode 100755 tests/FunctionalTests/selenium/core/domviewer/domviewer.css
create mode 100755 tests/FunctionalTests/selenium/core/domviewer/domviewer.html
create mode 100755 tests/FunctionalTests/selenium/core/domviewer/selenium-domviewer.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/find_matching_child.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/htmlutils.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/prototype-1.4.0.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-api.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-browserbot.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-browserdetect.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-commandhandlers.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-executionloop.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-logging.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-seleneserunner.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-testrunner.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-version.js
create mode 100755 tests/FunctionalTests/selenium/core/scripts/user-extensions.js.sample
create mode 100755 tests/FunctionalTests/selenium/core/scripts/xmlextras.js
create mode 100755 tests/FunctionalTests/selenium/core/selenium-logo.png
create mode 100755 tests/FunctionalTests/selenium/core/selenium.css
create mode 100755 tests/FunctionalTests/selenium/core/xpath/dom.js
create mode 100755 tests/FunctionalTests/selenium/core/xpath/misc.js
create mode 100755 tests/FunctionalTests/selenium/core/xpath/xpath.js
delete mode 100644 tests/FunctionalTests/selenium/doc/FAQ.html
delete mode 100644 tests/FunctionalTests/selenium/doc/FAQ.txt
delete mode 100644 tests/FunctionalTests/selenium/doc/contact.html
delete mode 100644 tests/FunctionalTests/selenium/doc/developingdrivers.html
delete mode 100644 tests/FunctionalTests/selenium/doc/driven.html
delete mode 100644 tests/FunctionalTests/selenium/doc/home-page.html
delete mode 100644 tests/FunctionalTests/selenium/doc/images/Adjacent.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/Embedded.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/SmallAdjacent.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/SmallEmbedded.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/SmallStandalone.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/Standalone.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/localhostAut.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/localhostDriver.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/localhostSelenium.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/stockmeister.png
delete mode 100644 tests/FunctionalTests/selenium/doc/images/tested-with-selenium.png
delete mode 100644 tests/FunctionalTests/selenium/doc/index.html
delete mode 100644 tests/FunctionalTests/selenium/doc/jsrmi.html
delete mode 100644 tests/FunctionalTests/selenium/doc/release-notes.html
delete mode 100644 tests/FunctionalTests/selenium/doc/rst2html.bat
delete mode 100644 tests/FunctionalTests/selenium/doc/seleniumReference.html
delete mode 100644 tests/FunctionalTests/selenium/doc/seleniumReference.txt
delete mode 100644 tests/FunctionalTests/selenium/doc/testRunner.txt
delete mode 100644 tests/FunctionalTests/selenium/doc/testrunner.html
delete mode 100644 tests/FunctionalTests/selenium/doc/usage.html
delete mode 100644 tests/FunctionalTests/selenium/dom-images/butmin.gif
delete mode 100644 tests/FunctionalTests/selenium/dom-images/butplus.gif
delete mode 100644 tests/FunctionalTests/selenium/dom-styles/default.css
delete mode 100644 tests/FunctionalTests/selenium/domviewer.html
delete mode 100644 tests/FunctionalTests/selenium/html-xpath/carnation.jpg
delete mode 100644 tests/FunctionalTests/selenium/html-xpath/example.html
delete mode 100644 tests/FunctionalTests/selenium/html-xpath/html-xpath-patched.js
delete mode 100644 tests/FunctionalTests/selenium/html-xpath/html-xpath.js
delete mode 100644 tests/FunctionalTests/selenium/html-xpath/license.txt
delete mode 100644 tests/FunctionalTests/selenium/html-xpath/rainbow.jpg
delete mode 100644 tests/FunctionalTests/selenium/htmlutils.js
delete mode 100644 tests/FunctionalTests/selenium/index.html
delete mode 100644 tests/FunctionalTests/selenium/install-readme.txt
delete mode 100644 tests/FunctionalTests/selenium/jsmock/mock-tests.html
delete mode 100644 tests/FunctionalTests/selenium/jsmock/mock.js
delete mode 100644 tests/FunctionalTests/selenium/readme-selenium-fitrunner.txt
delete mode 100644 tests/FunctionalTests/selenium/readme-selenium-rpcrunner.txt
delete mode 100644 tests/FunctionalTests/selenium/selenium-api.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-browserbot.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-commandhandlers.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-domviewer.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-executionloop.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-fitrunner.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-logging.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-logo.graffle
delete mode 100644 tests/FunctionalTests/selenium/selenium-logo.png
delete mode 100644 tests/FunctionalTests/selenium/selenium-seleneserunner.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-tableparser.js
delete mode 100644 tests/FunctionalTests/selenium/selenium-testrunner.js
delete mode 100644 tests/FunctionalTests/selenium/selenium.css
delete mode 100644 tests/FunctionalTests/selenium/user-extensions.js.sample
delete mode 100644 tests/FunctionalTests/selenium/xmlextras.js
delete mode 100644 tests/FunctionalTests/selenium/xpath.js
diff --git a/.gitattributes b/.gitattributes
index 08cd6622..a18d9820 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -130,6 +130,10 @@ demos/quickstart/index.php -text
demos/quickstart/index2.php -text
demos/quickstart/protected/.htaccess -text
demos/quickstart/protected/application.xml -text
+demos/quickstart/protected/comments/CommentList.php -text
+demos/quickstart/protected/comments/CommentList.tpl -text
+demos/quickstart/protected/comments/QuickStartComments.php -text
+demos/quickstart/protected/comments/comments.db -text
demos/quickstart/protected/controls/DocLink.php -text
demos/quickstart/protected/controls/Layout.php -text
demos/quickstart/protected/controls/Layout.tpl -text
@@ -233,6 +237,8 @@ demos/quickstart/protected/pages/Advanced/mastercontent.gif -text
demos/quickstart/protected/pages/Advanced/mastercontent.vsd -text
demos/quickstart/protected/pages/Advanced/pcrelation.gif -text
demos/quickstart/protected/pages/Advanced/pcrelation.vsd -text
+demos/quickstart/protected/pages/Comments.page -text
+demos/quickstart/protected/pages/Comments.php -text
demos/quickstart/protected/pages/Configurations/AppConfig.page -text
demos/quickstart/protected/pages/Configurations/Overview.page -text
demos/quickstart/protected/pages/Configurations/PageConfig.page -text
@@ -476,6 +482,8 @@ docs/sqlmap/latex/tut3.tex -text
docs/sqlmap/sqlmap.pdf -text
docs/sqlmap/sqlmap_tut.pdf -text
framework/.htaccess -text
+framework/3rdParty/Markdown/License.text -text
+framework/3rdParty/Markdown/MarkdownParser.php -text
framework/3rdParty/SafeHtml/HTMLSax3.php -text
framework/3rdParty/SafeHtml/HTMLSax3/Decorators.php -text
framework/3rdParty/SafeHtml/HTMLSax3/States.php -text
@@ -1074,6 +1082,7 @@ framework/Web/UI/WebControls/TListControl.php -text
framework/Web/UI/WebControls/TListControlValidator.php -text
framework/Web/UI/WebControls/TListItem.php -text
framework/Web/UI/WebControls/TLiteral.php -text
+framework/Web/UI/WebControls/TMarkdown.php -text
framework/Web/UI/WebControls/TMultiView.php -text
framework/Web/UI/WebControls/TOutputCache.php -text
framework/Web/UI/WebControls/TPanel.php -text
@@ -1189,76 +1198,39 @@ tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php -text
tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php -text
tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php -text
tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php -text
-tests/FunctionalTests/selenium/SeleneseRunner.html -text
-tests/FunctionalTests/selenium/SeleniumLog.html -text
-tests/FunctionalTests/selenium/TestRunner-splash.html -text
-tests/FunctionalTests/selenium/TestRunner.hta -text
-tests/FunctionalTests/selenium/TestRunner.html -text
-tests/FunctionalTests/selenium/VERSION.txt -text
-tests/FunctionalTests/selenium/build.xml -text
-tests/FunctionalTests/selenium/doc/FAQ.html -text
-tests/FunctionalTests/selenium/doc/FAQ.txt -text
-tests/FunctionalTests/selenium/doc/contact.html -text
-tests/FunctionalTests/selenium/doc/developingdrivers.html -text
-tests/FunctionalTests/selenium/doc/driven.html -text
-tests/FunctionalTests/selenium/doc/home-page.html -text
-tests/FunctionalTests/selenium/doc/images/Adjacent.png -text
-tests/FunctionalTests/selenium/doc/images/Embedded.png -text
-tests/FunctionalTests/selenium/doc/images/SmallAdjacent.png -text
-tests/FunctionalTests/selenium/doc/images/SmallEmbedded.png -text
-tests/FunctionalTests/selenium/doc/images/SmallStandalone.png -text
-tests/FunctionalTests/selenium/doc/images/Standalone.png -text
-tests/FunctionalTests/selenium/doc/images/localhostAut.png -text
-tests/FunctionalTests/selenium/doc/images/localhostDriver.png -text
-tests/FunctionalTests/selenium/doc/images/localhostSelenium.png -text
-tests/FunctionalTests/selenium/doc/images/stockmeister.png -text
-tests/FunctionalTests/selenium/doc/images/tested-with-selenium.png -text
-tests/FunctionalTests/selenium/doc/index.html -text
-tests/FunctionalTests/selenium/doc/jsrmi.html -text
-tests/FunctionalTests/selenium/doc/release-notes.html -text
-tests/FunctionalTests/selenium/doc/rst2html.bat -text
-tests/FunctionalTests/selenium/doc/seleniumReference.html -text
-tests/FunctionalTests/selenium/doc/seleniumReference.txt -text
-tests/FunctionalTests/selenium/doc/testRunner.txt -text
-tests/FunctionalTests/selenium/doc/testrunner.html -text
-tests/FunctionalTests/selenium/doc/usage.html -text
-tests/FunctionalTests/selenium/dom-images/butmin.gif -text
-tests/FunctionalTests/selenium/dom-images/butplus.gif -text
-tests/FunctionalTests/selenium/dom-styles/default.css -text
-tests/FunctionalTests/selenium/domviewer.html -text
-tests/FunctionalTests/selenium/html-xpath/carnation.jpg -text
-tests/FunctionalTests/selenium/html-xpath/example.html -text
-tests/FunctionalTests/selenium/html-xpath/html-xpath-patched.js -text
-tests/FunctionalTests/selenium/html-xpath/html-xpath.js -text
-tests/FunctionalTests/selenium/html-xpath/license.txt -text
-tests/FunctionalTests/selenium/html-xpath/rainbow.jpg -text
-tests/FunctionalTests/selenium/htmlutils.js -text
-tests/FunctionalTests/selenium/index.html -text
-tests/FunctionalTests/selenium/install-readme.txt -text
-tests/FunctionalTests/selenium/jsmock/mock-tests.html -text
-tests/FunctionalTests/selenium/jsmock/mock.js -text
+tests/FunctionalTests/selenium/core/SeleneseRunner.html -text
+tests/FunctionalTests/selenium/core/SeleniumLog.html -text
+tests/FunctionalTests/selenium/core/TestPrompt.html -text
+tests/FunctionalTests/selenium/core/TestRunner-splash.html -text
+tests/FunctionalTests/selenium/core/TestRunner.html -text
+tests/FunctionalTests/selenium/core/domviewer/butmin.gif -text
+tests/FunctionalTests/selenium/core/domviewer/butplus.gif -text
+tests/FunctionalTests/selenium/core/domviewer/domviewer.css -text
+tests/FunctionalTests/selenium/core/domviewer/domviewer.html -text
+tests/FunctionalTests/selenium/core/domviewer/selenium-domviewer.js -text
+tests/FunctionalTests/selenium/core/scripts/find_matching_child.js -text
+tests/FunctionalTests/selenium/core/scripts/htmlutils.js -text
+tests/FunctionalTests/selenium/core/scripts/prototype-1.4.0.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-api.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-browserbot.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-browserdetect.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-commandhandlers.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-executionloop.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-logging.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-seleneserunner.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-testrunner.js -text
+tests/FunctionalTests/selenium/core/scripts/selenium-version.js -text
+tests/FunctionalTests/selenium/core/scripts/user-extensions.js.sample -text
+tests/FunctionalTests/selenium/core/scripts/xmlextras.js -text
+tests/FunctionalTests/selenium/core/selenium-logo.png -text
+tests/FunctionalTests/selenium/core/selenium.css -text
+tests/FunctionalTests/selenium/core/xpath/dom.js -text
+tests/FunctionalTests/selenium/core/xpath/misc.js -text
+tests/FunctionalTests/selenium/core/xpath/xpath.js -text
tests/FunctionalTests/selenium/php/TestRunner.php -text
tests/FunctionalTests/selenium/php/results.php -text
tests/FunctionalTests/selenium/php/selenium.php -text
tests/FunctionalTests/selenium/prado-functional-test.js -text
-tests/FunctionalTests/selenium/readme-selenium-fitrunner.txt -text
-tests/FunctionalTests/selenium/readme-selenium-rpcrunner.txt -text
-tests/FunctionalTests/selenium/selenium-api.js -text
-tests/FunctionalTests/selenium/selenium-browserbot.js -text
-tests/FunctionalTests/selenium/selenium-commandhandlers.js -text
-tests/FunctionalTests/selenium/selenium-domviewer.js -text
-tests/FunctionalTests/selenium/selenium-executionloop.js -text
-tests/FunctionalTests/selenium/selenium-fitrunner.js -text
-tests/FunctionalTests/selenium/selenium-logging.js -text
-tests/FunctionalTests/selenium/selenium-logo.graffle -text
-tests/FunctionalTests/selenium/selenium-logo.png -text
-tests/FunctionalTests/selenium/selenium-seleneserunner.js -text
-tests/FunctionalTests/selenium/selenium-tableparser.js -text
-tests/FunctionalTests/selenium/selenium-testrunner.js -text
-tests/FunctionalTests/selenium/selenium.css -text
-tests/FunctionalTests/selenium/user-extensions.js.sample -text
-tests/FunctionalTests/selenium/xmlextras.js -text
-tests/FunctionalTests/selenium/xpath.js -text
tests/FunctionalTests/tickets.php -text
tests/FunctionalTests/tickets/index.php -text
tests/FunctionalTests/tickets/protected/pages/Layout.php -text
diff --git a/HISTORY b/HISTORY
index 73068587..8e82239b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -31,6 +31,7 @@ ENH: added TTheme.BaseUrl and TTheme.BasePath property (Qiang)
ENH: added TListControl.SelectedValues property (Qiang)
ENH: added TThemeManager.AvailableThemes property (Qiang)
ENH: refactored TUserManager and TAuthManager so that they are easier to be extended (Qiang)
+ENH: template syntax now supports setting event handler via subproperties (Qiang)
CHG: Ticket#151 - URL format is modified to handle empty GET values (Qiang)
CHG: Ticket#153 - TAssetManager now ignores .svn directories (Qiang)
NEW: TTableHeaderRow, TTableFooterRow and table section support (Qiang)
diff --git a/demos/blog/protected/Pages/Admin/ConfigMan.page b/demos/blog/protected/Pages/Admin/ConfigMan.page
index 5c6cd53d..b959551e 100644
--- a/demos/blog/protected/Pages/Admin/ConfigMan.page
+++ b/demos/blog/protected/Pages/Admin/ConfigMan.page
@@ -1,3 +1,5 @@
+<%@ Title="System Configuration" %>
+
Administration Center
diff --git a/demos/blog/protected/Pages/Admin/PostMan.page b/demos/blog/protected/Pages/Admin/PostMan.page
index 68ac44f8..9d96af42 100644
--- a/demos/blog/protected/Pages/Admin/PostMan.page
+++ b/demos/blog/protected/Pages/Admin/PostMan.page
@@ -1,3 +1,5 @@
+<%@ Title="Post Management" %>
+
Administration Center
diff --git a/demos/blog/protected/Pages/Admin/UserMan.page b/demos/blog/protected/Pages/Admin/UserMan.page
index a8b634c6..02b1a069 100644
--- a/demos/blog/protected/Pages/Admin/UserMan.page
+++ b/demos/blog/protected/Pages/Admin/UserMan.page
@@ -1,3 +1,5 @@
+<%@ Title="User Management" %>
+
Administration Center
diff --git a/demos/blog/protected/Pages/Posts/MyPost.page b/demos/blog/protected/Pages/Posts/MyPost.page
index ca153166..69ba78e4 100644
--- a/demos/blog/protected/Pages/Posts/MyPost.page
+++ b/demos/blog/protected/Pages/Posts/MyPost.page
@@ -1,3 +1,5 @@
+<%@ Title="My Posts" %>
+
My Posts
@@ -25,7 +27,7 @@
TTranslate can also perform string substitution. Any attributes of TTranslate will be substituted with {attribute name} in the translation. E.g.
+TTranslate can also perform string substitution.
+The Parameters property can be use to add name values pairs for substitution. Substrings in the translation enclosed with "{" and "}" are consider as the
+ parameter names during substitution lookup. The following example will substitute the substring "{time}" with the value of the parameter attribute "Parameters.time=<%= time() %>".
s around
+ # "paragraphs" that are wrapped in non-block-level tags, such as anchors,
+ # phrase emphasis, and spans. The list of tags we're looking for is
+ # hard-coded:
+ $block_tags_a = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|'.
+ 'script|noscript|form|fieldset|iframe|math|ins|del';
+ $block_tags_b = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|'.
+ 'script|noscript|form|fieldset|iframe|math';
+
+ # First, look for nested blocks, e.g.:
+ # tags around block-level tags.
+ $text = $this->_HashHTMLBlocks($text);
+ $text = $this->_FormParagraphs($text);
+
+ return $text;
+ }
+
+
+ private function _RunSpanGamut($text) {
+ #
+ # These are all the transformations that occur *within* block-level
+ # tags like paragraphs, headers, and list items.
+ #
+
+ $text = $this->_DoCodeSpans($text);
+
+ $text = $this->_EscapeSpecialChars($text);
+
+ # Process anchor and image tags. Images must come first,
+ # because ![foo][f] looks like an anchor.
+ $text = $this->_DoImages($text);
+ $text = $this->_DoAnchors($text);
+
+ # Make links out of things like ` Just type tags
+ #
+ # Strip leading and trailing lines:
+ $text = preg_replace(array('/\A\n+/', '/\n+\z/'), '', $text);
+
+ $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY);
+
+ #
+ # Wrap tags.
+ #
+ foreach ($grafs as $key => $value) {
+ if (!isset( $this->md_html_blocks[$value] )) {
+ $value = $this->_RunSpanGamut($value);
+ $value = preg_replace('/^([ \t]*)/', ' ', $value);
+ $value .= "
+ * $markdown = new MarkdownParser;
+ * echo $markdown->parse($text);
+ *
+ */
+class MarkdownParser
+{
+ private static $md_nested_brackets;
+ private static $md_escape_table = array();
+ private static $md_backslash_escape_table = array();
+ private static $md_nested_brackets_depth = 6;
+
+ protected $md_empty_element_suffix = " />"; # Change to ">" for HTML output
+ protected $md_tab_width = 4;
+
+ private $md_list_level = 0;
+ private $md_urls = array();
+ private $md_titles = array();
+ private $md_html_blocks = array();
+
+ public function __construct()
+ {
+ if(is_null(self::$md_nested_brackets))
+ $this->initialize();
+ }
+
+ private function initialize()
+ {
+ self::$md_nested_brackets =
+ str_repeat('(?>[^\[\]]+|\[', self::$md_nested_brackets_depth).
+ str_repeat('\])*', self::$md_nested_brackets_depth);
+
+ self::$md_escape_table = array(
+ "\\" => md5("\\"),
+ "`" => md5("`"),
+ "*" => md5("*"),
+ "_" => md5("_"),
+ "{" => md5("{"),
+ "}" => md5("}"),
+ "[" => md5("["),
+ "]" => md5("]"),
+ "(" => md5("("),
+ ")" => md5(")"),
+ ">" => md5(">"),
+ "#" => md5("#"),
+ "+" => md5("+"),
+ "-" => md5("-"),
+ "." => md5("."),
+ "!" => md5("!")
+ );
+
+ # Table of hash values for escaped characters:
+ # Create an identical table but for escaped characters.
+ foreach (self::$md_escape_table as $key => $char)
+ self::$md_backslash_escape_table["\\$key"] = $char;
+ }
+
+ public function parse($text)
+ {
+ #
+ # Main function. The order in which other subs are called here is
+ # essential. Link and image substitutions need to happen before
+ # _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the
+ # and tags get encoded.
+ #
+ # Clear the hashes. If we don't clear these, you get conflicts
+ # from other articles when generating a page which contains more than
+ # one article (e.g. an index page that shows the N most recent
+ # articles):
+ $this->md_urls = array();
+ $this->md_titles = array();
+ $this->md_html_blocks = array();
+
+ # Standardize line endings:
+ # DOS to Unix and Mac to Unix
+ $text = str_replace(array("\r\n", "\r"), "\n", $text);
+
+ # Make sure $text ends with a couple of newlines:
+ $text .= "\n\n";
+
+ # Convert all tabs to spaces.
+ $text = $this->_Detab($text);
+
+ # Strip any lines consisting only of spaces and tabs.
+ # This makes subsequent regexen easier to write, because we can
+ # match consecutive blank lines with /\n+/ instead of something
+ # contorted like /[ \t]*\n+/ .
+ $text = preg_replace('/^[ \t]+$/m', '', $text);
+
+ # Turn block-level HTML blocks into hash entries
+ $text = $this->_HashHTMLBlocks($text);
+
+ # Strip link definitions, store in hashes.
+ $text = $this->_StripLinkDefinitions($text);
+
+ $text = $this->_RunBlockGamut($text);
+
+ $text = $this->_UnescapeSpecialChars($text);
+
+ return $text . "\n";
+ }
+
+
+ private function _StripLinkDefinitions($text) {
+ #
+ # Strips link definitions from text, stores the URLs and titles in
+ # hash references.
+ #
+ $less_than_tab = $this->md_tab_width - 1;
+
+ # Link defs are in the form: ^[id]: url "optional title"
+ $text = preg_replace_callback('{
+ ^[ ]{0,'.$less_than_tab.'}\[(.+)\]: # id = $1
+ [ \t]*
+ \n? # maybe *one* newline
+ [ \t]*
+ (\S+?)>? # url = $2
+ [ \t]*
+ \n? # maybe one newline
+ [ \t]*
+ (?:
+ (?<=\s) # lookbehind for whitespace
+ ["(]
+ (.+?) # title = $3
+ [")]
+ [ \t]*
+ )? # title is optional
+ (?:\n+|\Z)
+ }xm',
+ array($this,'_StripLinkDefinitions_callback'),
+ $text);
+ return $text;
+ }
+
+ private function _StripLinkDefinitions_callback($matches) {
+ $link_id = strtolower($matches[1]);
+ $this->md_urls[$link_id] = $this->_EncodeAmpsAndAngles($matches[2]);
+ if (isset($matches[3]))
+ $this->md_titles[$link_id] = str_replace('"', '"', $matches[3]);
+ return ''; # String that will replace the block
+ }
+
+
+ private function _HashHTMLBlocks($text) {
+ $less_than_tab = $this->md_tab_width - 1;
+
+ # Hashify HTML blocks:
+ # We only want to do this for block-level HTML tags, such as headers,
+ # lists, and tables. That's because we still want to wrap
. It was easier to make a special case than
+ # to make the other regex more complicated.
+ $text = preg_replace_callback('{
+ (?:
+ (?<=\n\n) # Starting after a blank line
+ | # or
+ \A\n? # the beginning of the doc
+ )
+ ( # save in $1
+ [ ]{0,'.$less_than_tab.'}
+ <(hr) # start tag = $2
+ \b # word break
+ ([^<>])*? #
+ /?> # the matching end tag
+ [ \t]*
+ (?=\n{2,}|\Z) # followed by a blank line or end of document
+ )
+ }x',
+ array($this,'_HashHTMLBlocks_callback'),
+ $text);
+
+ # Special case for standalone HTML comments:
+ $text = preg_replace_callback('{
+ (?:
+ (?<=\n\n) # Starting after a blank line
+ | # or
+ \A\n? # the beginning of the doc
+ )
+ ( # save in $1
+ [ ]{0,'.$less_than_tab.'}
+ (?s:
+
+ )
+ [ \t]*
+ (?=\n{2,}|\Z) # followed by a blank line or end of document
+ )
+ }x',
+ array($this,'_HashHTMLBlocks_callback'),
+ $text);
+
+ return $text;
+ }
+ private function _HashHTMLBlocks_callback($matches) {
+ $text = $matches[1];
+ $key = md5($text);
+ $this->md_html_blocks[$key] = $text;
+ return "\n\n$key\n\n"; # String that will replace the block
+ }
+
+
+ private function _RunBlockGamut($text) {
+ #
+ # These are all the transformations that form block-level
+ # tags like paragraphs, headers, and list items.
+ #
+ $text = $this->_DoHeaders($text);
+
+ # Do Horizontal Rules:
+ $text = preg_replace(
+ array('{^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$}mx',
+ '{^[ ]{0,2}([ ]? -[ ]?){3,}[ \t]*$}mx',
+ '{^[ ]{0,2}([ ]? _[ ]?){3,}[ \t]*$}mx'),
+ "\n
md_empty_element_suffix}\n",
+ $text);
+
+ $text = $this->_DoLists($text);
+ $text = $this->_DoCodeBlocks($text);
+ $text = $this->_DoBlockQuotes($text);
+
+ # We already ran _HashHTMLBlocks() before, in Markdown(), but that
+ # was to escape raw HTML in the original Markdown source. This time,
+ # we're escaping the markup we've just created, so that we don't wrap
+ #
md_empty_element_suffix}\n", $text);
+
+ return $text;
+ }
+
+
+ private function _EscapeSpecialChars($text) {
+ $tokens = $this->_TokenizeHTML($text);
+
+ $text = ''; # rebuild $text from the tokens
+ # $in_pre = 0; # Keep track of when we're inside or
tags.
+ # $tags_to_skip = "!<(/?)(?:pre|code|kbd|script|math)[\s>]!";
+
+ foreach ($tokens as $cur_token) {
+ if ($cur_token[0] == 'tag') {
+ # Within tags, encode * and _ so they don't conflict
+ # with their use in Markdown for italics and strong.
+ # We're replacing each such character with its
+ # corresponding MD5 checksum value; this is likely
+ # overkill, but it should prevent us from colliding
+ # with the escape values by accident.
+ $cur_token[1] = str_replace(array('*', '_'),
+ array(self::$md_escape_table['*'], self::$md_escape_table['_']),
+ $cur_token[1]);
+ $text .= $cur_token[1];
+ } else {
+ $t = $cur_token[1];
+ $t = $this->_EncodeBackslashEscapes($t);
+ $text .= $t;
+ }
+ }
+ return $text;
+ }
+
+
+ private function _DoAnchors($text) {
+ #
+ # Turn Markdown link shortcuts into XHTML tags.
+ #
+ #
+ # First, handle reference-style links: [link text] [id]
+ #
+ $bracket = self::$md_nested_brackets;
+ $text = preg_replace_callback("{
+ ( # wrap whole match in $1
+ \\[
+ ({$bracket}) # link text = $2
+ \\]
+
+ [ ]? # one optional space
+ (?:\\n[ ]*)? # one optional newline followed by spaces
+
+ \\[
+ (.*?) # id = $3
+ \\]
+ )
+ }xs",
+ array($this,'_DoAnchors_reference_callback'), $text);
+
+ #
+ # Next, inline-style links: [link text](url "optional title")
+ #
+ $text = preg_replace_callback("{
+ ( # wrap whole match in $1
+ \\[
+ ({$bracket}) # link text = $2
+ \\]
+ \\( # literal paren
+ [ \\t]*
+ (.*?)>? # href = $3
+ [ \\t]*
+ ( # $4
+ (['\"]) # quote char = $5
+ (.*?) # Title = $6
+ \\5 # matching quote
+ )? # title is optional
+ \\)
+ )
+ }xs",
+ array($this,'_DoAnchors_inline_callback'), $text);
+
+ return $text;
+ }
+ private function _DoAnchors_reference_callback($matches) {
+ $whole_match = $matches[1];
+ $link_text = $matches[2];
+ $link_id = strtolower($matches[3]);
+
+ if ($link_id == "") {
+ $link_id = strtolower($link_text); # for shortcut links like [this][].
+ }
+
+ if (isset($this->md_urls[$link_id])) {
+ $url = $this->md_urls[$link_id];
+ # We've got to encode these to avoid conflicting with italics/bold.
+ $url = str_replace(array('*', '_'),
+ array(self::$md_escape_table['*'], self::$md_escape_table['_']),
+ $url);
+ $result = "md_titles[$link_id] ) ) {
+ $title = $this->md_titles[$link_id];
+ $title = str_replace(array('*', '_'),
+ array(self::$md_escape_table['*'],
+ self::$md_escape_table['_']), $title);
+ $result .= " title=\"$title\"";
+ }
+ $result .= ">$link_text";
+ }
+ else {
+ $result = $whole_match;
+ }
+ return $result;
+ }
+ private function _DoAnchors_inline_callback($matches) {
+ $whole_match = $matches[1];
+ $link_text = $matches[2];
+ $url = $matches[3];
+ $title =& $matches[6];
+
+ # We've got to encode these to avoid conflicting with italics/bold.
+ $url = str_replace(array('*', '_'),
+ array(self::$md_escape_table['*'], self::$md_escape_table['_']),
+ $url);
+ $result = " tags.
+ #
+ #
+ # First, handle reference-style labeled images: ![alt text][id]
+ #
+ $text = preg_replace_callback('{
+ ( # wrap whole match in $1
+ !\[
+ ('.self::$md_nested_brackets.') # alt text = $2
+ \]
+
+ [ ]? # one optional space
+ (?:\n[ ]*)? # one optional newline followed by spaces
+
+ \[
+ (.*?) # id = $3
+ \]
+
+ )
+ }xs',
+ array($this,'_DoImages_reference_callback'), $text);
+
+ #
+ # Next, handle inline images: ![alt text](url "optional title")
+ # Don't forget: encode * and _
+
+ $text = preg_replace_callback('{
+ ( # wrap whole match in $1
+ !\[
+ ('.self::$md_nested_brackets.') # alt text = $2
+ \]
+ \( # literal paren
+ [ \t]*
+ (\S+?)>? # src url = $3
+ [ \t]*
+ ( # $4
+ ([\'"]) # quote char = $5
+ (.*?) # title = $6
+ \5 # matching quote
+ [ \t]*
+ )? # title is optional
+ \)
+ )
+ }xs',
+ array($this,'_DoImages_inline_callback'), $text);
+
+ return $text;
+ }
+ private function _DoImages_reference_callback($matches) {
+ $whole_match = $matches[1];
+ $alt_text = $matches[2];
+ $link_id = strtolower($matches[3]);
+
+ if ($link_id == "") {
+ $link_id = strtolower($alt_text); # for shortcut links like ![this][].
+ }
+
+ $alt_text = str_replace('"', '"', $alt_text);
+ if (isset($this->md_urls[$link_id])) {
+ $url = $this->md_urls[$link_id];
+ # We've got to encode these to avoid conflicting with italics/bold.
+ $url = str_replace(array('*', '_'),
+ array(self::$md_escape_table['*'], self::$md_escape_table['_']),
+ $url);
+ $result = "
md_titles[$link_id])) {
+ $title = $this->md_titles[$link_id];
+ $title = str_replace(array('*', '_'),
+ array(self::$md_escape_table['*'],
+ self::$md_escape_table['_']), $title);
+ $result .= " title=\"$title\"";
+ }
+ $result .= $this->md_empty_element_suffix;
+ }
+ else {
+ # If there's no such link ID, leave intact:
+ $result = $whole_match;
+ }
+
+ return $result;
+ }
+ private function _DoImages_inline_callback($matches) {
+ $whole_match = $matches[1];
+ $alt_text = $matches[2];
+ $url = $matches[3];
+ $title = '';
+ if (isset($matches[6])) {
+ $title = $matches[6];
+ }
+
+ $alt_text = str_replace('"', '"', $alt_text);
+ $title = str_replace('"', '"', $title);
+ # We've got to encode these to avoid conflicting with italics/bold.
+ $url = str_replace(array('*', '_'),
+ array(self::$md_escape_table['*'], self::$md_escape_table['_']),
+ $url);
+ $result = "
md_empty_element_suffix;
+
+ return $result;
+ }
+
+
+ private function _DoHeaders($text) {
+ # Setext-style headers:
+ # Header 1
+ # ========
+ #
+ # Header 2
+ # --------
+ #
+ $text = preg_replace(
+ array('{ ^(.+)[ \t]*\n=+[ \t]*\n+ }emx',
+ '{ ^(.+)[ \t]*\n-+[ \t]*\n+ }emx'),
+ array("'
'.\$this->_RunSpanGamut(\$this->_UnslashQuotes('\\1')).'
\n\n'",
+ "''.\$this->_RunSpanGamut(\$this->_UnslashQuotes('\\1')).'
\n\n'"),
+ $text);
+
+ # atx-style headers:
+ # # Header 1
+ # ## Header 2
+ # ## Header 2 with closing hashes ##
+ # ...
+ # ###### Header 6
+ #
+ $text = preg_replace("{
+ ^(\\#{1,6}) # $1 = string of #'s
+ [ \\t]*
+ (.+?) # $2 = Header text
+ [ \\t]*
+ \\#* # optional closing #'s (not counted)
+ \\n+
+ }xme",
+ "'` blocks.
+ #
+ $text = preg_replace_callback('{
+ (?:\n\n|\A)
+ ( # $1 = the code block -- one or more lines, starting with a space/tab
+ (?:
+ (?:[ ]{'.$this->md_tab_width.'} | \t) # Lines must start with a tab or a tab-width of spaces
+ .*\n+
+ )+
+ )
+ ((?=^[ ]{0,'.$this->md_tab_width.'}\S)|\Z) # Lookahead for non-space at line-start, or end of doc
+ }xm',
+ array($this,'_DoCodeBlocks_callback'), $text);
+
+ return $text;
+ }
+ private function _DoCodeBlocks_callback($matches) {
+ $codeblock = $matches[1];
+
+ $codeblock = $this->_EncodeCode($this->_Outdent($codeblock));
+ // $codeblock = _Detab($codeblock);
+ # trim leading newlines and trailing whitespace
+ $codeblock = preg_replace(array('/\A\n+/', '/\s+\z/'), '', $codeblock);
+
+ $result = "\n\n
\n\n";
+
+ return $result;
+ }
+
+
+ private function _DoCodeSpans($text) {
+ #
+ # * Backtick quotes are used for " . $codeblock . "\n
spans.
+ #
+ # * You can use multiple backticks as the delimiters if you want to
+ # include literal backticks in the code span. So, this input:
+ #
+ # Just type ``foo `bar` baz`` at the prompt.
+ #
+ # Will translate to:
+ #
+ #
foo `bar` baz
at the prompt.`bar`
...
+ #
+ $text = preg_replace_callback('@
+ (?_EncodeCode($c);
+ return "$c
";
+ }
+
+
+ private function _EncodeCode($_) {
+ #
+ # Encode/escape certain characters inside Markdown code runs.
+ # The point is that in code, these characters are literals,
+ # and lose their special Markdown meanings.
+ #
+ # Encode all ampersands; HTML entities are not
+ # entities within a Markdown code span.
+ $_ = str_replace('&', '&', $_);
+
+ # Do the angle bracket song and dance:
+ $_ = str_replace(array('<', '>'),
+ array('<', '>'), $_);
+
+ # Now, escape characters that are magic in Markdown:
+ $_ = str_replace(array_keys(self::$md_escape_table),
+ array_values(self::$md_escape_table), $_);
+
+ return $_;
+ }
+
+
+ private function _DoItalicsAndBold($text) {
+ # must go first:
+ $text = preg_replace('{
+ ( # $1: Marker
+ (?\2', $text);
+ # Then :
+ $text = preg_replace(
+ '{ ( (?\2', $text);
+
+ return $text;
+ }
+
+
+ private function _DoBlockQuotes($text) {
+ $text = preg_replace_callback('/
+ ( # Wrap whole match in $1
+ (
+ ^[ \t]*>[ \t]? # ">" at the start of a line
+ .+\n # rest of the first line
+ (.+\n)* # subsequent consecutive lines
+ \n* # blanks
+ )+
+ )
+ /xm',
+ array($this,'_DoBlockQuotes_callback'), $text);
+
+ return $text;
+ }
+ private function _DoBlockQuotes_callback($matches) {
+ $bq = $matches[1];
+ # trim one level of quoting - trim whitespace-only lines
+ $bq = preg_replace(array('/^[ \t]*>[ \t]?/m', '/^[ \t]+$/m'), '', $bq);
+ $bq = $this->_RunBlockGamut($bq); # recurse
+
+ $bq = preg_replace('/^/m', " ", $bq);
+ # These leading spaces screw with content, so we need to fix that:
+ $bq = preg_replace_callback('{(\s*
.+?
)}sx',
+ array($this,'_DoBlockQuotes_callback2'), $bq);
+
+ return "\n$bq\n
\n\n";
+ }
+ private function _DoBlockQuotes_callback2($matches) {
+ $pre = $matches[1];
+ $pre = preg_replace('/^ /m', '', $pre);
+ return $pre;
+ }
+
+
+ private function _FormParagraphs($text) {
+ #
+ # Params:
+ # $text - string to process with html as well).
+
+For more information about Markdown's syntax, see:
+
+
Slightly modified to work nicely with E_STRICT in php 5.
+
+
+
Markdown
+ PHP Markdown
+ BSD
+ System.Web.UI.WebControls.TMarkdown
+ PHP5 class implementation of the PHP Markdown.
+
Comments + ( Add your comments )
+Post a comment
+Note: + Please only use the comments in relation to this page for +
+- questions/critcisms/suggestions on the documentation,
+ - small notes that can solve or clarify a particular problem or task.
+
+ If you experience errors please file a ticket + or ask at the forum. + Please use the Prado wiki for longer pieces and detailed solutions. + +Comments will be periodically reviewed, integrated into the documentation and removed. + You may use markdown syntax in your comment.
+ +Preview comment
+Preview comment
+