JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
xhtml -> html5
authorJason Woofenden <jason@jasonwoof.com>
Sun, 24 Oct 2010 00:51:40 +0000 (20:51 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Sun, 24 Oct 2010 03:13:09 +0000 (23:13 -0400)
14 files changed:
encode.php
examples/404.html
examples/calendar.html
messages.php
metaform/main.html
metaform/preview.html
metaform/template.html
run.php
run2.php
test/session_test.html
test/tem_test.php.html
unit_tests/template.html
upload.php
uploader/uploader.html

index b81a4fc..07bd2f8 100644 (file)
@@ -51,17 +51,17 @@ function enc_html($str) {
        return $str;
 }
 
-# Encode for output in html. Convert newlines to <br />
+# Encode for output in html. Convert newlines to <br>
 #
 # Example: <p>~foo htmlbr~</p>
 function enc_htmlbr($str) {
        $str = enc_html($str);
-       $str = str_replace("\n", "<br />\n", $str);
+       $str = str_replace("\n", "<br>\n", $str);
        return $str;
 }
 
 # Encode for output in html. Preserves newlines and indentation by converting
-# newlines to <br /> and spaces at the begining of lines to &nbsp;&nbsp;
+# newlines to <br> and spaces at the begining of lines to &nbsp;&nbsp;
 #
 # Example: <p>~foo htmlbrtab~</p>
 function enc_htmlbrtab($str) {
@@ -71,7 +71,7 @@ function enc_htmlbrtab($str) {
        return $str;
 }
 
-# Encode for output in html. Spaces converted to &nbsp; and \n to <br />
+# Encode for output in html. Spaces converted to &nbsp; and \n to <br>
 #
 # Example: <option value="12">~foo htmlbrnbsp~</option>
 function enc_htmlbrnbsp($str) {
index 7cb09e5..2802848 100644 (file)
@@ -1,6 +1,6 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title>404 File Not Found</title>
 </head>
index 3135b51..8edc126 100644 (file)
@@ -1,9 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title></title>
-  <link rel="stylesheet" href="calendar.css" type="text/css" />
+  <link rel="stylesheet" href="calendar.css" type="text/css">
 </head>
 
 <body>
index 0dc21e2..cf979d7 100644 (file)
@@ -44,7 +44,7 @@
 #      <!--~}~-->
 #          <p style="font-size: 120%; padding: 5px; margin: 0px">~data html~</p>
 #      <!--~ sep {~-->
-#          <hr />
+#          <hr>
 #      <!--~}~-->
 #      <!--~ last {~-->
 #        </div>
index f698d14..f15b49e 100644 (file)
@@ -1,6 +1,6 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title>Meta Form</title>
 </head>
   <form action="~metaform_name~" method="get">
     <p>The form name should not contain any capitals or symbols (besides underscore)</p>
 
-    <p>File name: <input type="text" name="file_name" value="~file_name attr~" />.html</p>
+    <p>File name: <input type="text" name="file_name" value="~file_name attr~">.html</p>
 
-    <p>DB table: <input type="text" name="table_name" value="~table_name attr~" /></p>
+    <p>DB table: <input type="text" name="table_name" value="~table_name attr~"></p>
 
-    <p>Printable singular: <input type="text" name="singular" value="~singular attr~" /></p>
+    <p>Printable singular: <input type="text" name="singular" value="~singular attr~"></p>
 
-    <p>Printable plural: <input type="text" name="plural" value="~plural attr~" /></p>
+    <p>Printable plural: <input type="text" name="plural" value="~plural attr~"></p>
 
 
        <h3>Features</h3>
 
-    <p><input type="checkbox" name="opt_email~opt_email checked~" value="Yes" /> Send form results vie e-mail.</p>
+    <p><input type="checkbox" name="opt_email~opt_email checked~" value="Yes"> Send form results vie e-mail.</p>
 
-    <p><input type="checkbox" name="opt_db~opt_db checked~" value="Yes" /> Save form results to a database.</p>
+    <p><input type="checkbox" name="opt_db~opt_db checked~" value="Yes"> Save form results to a database.</p>
 
-    <p><input type="checkbox" name="opt_listing~opt_listing checked~" value="Yes" /> Provide a "Listing" page.</p>
+    <p><input type="checkbox" name="opt_listing~opt_listing checked~" value="Yes"> Provide a "Listing" page.</p>
 
-    <p><input type="checkbox" name="opt_display~opt_display checked~" value="Yes" /> Provide a "Display" page.</p>
+    <p><input type="checkbox" name="opt_display~opt_display checked~" value="Yes"> Provide a "Display" page.</p>
 
-    <p><input type="checkbox" name="opt_pass~opt_pass checked~" value="Yes" /> Password protect this form.</p>
+    <p><input type="checkbox" name="opt_pass~opt_pass checked~" value="Yes"> Password protect this form.</p>
 
        <p>Below, specify the fields you'd like in your form, one field per line. After each field name, put at least one space, then the field type. The following field types are available: <!--~types {~--><!--~types_sep {~-->, <!--~}~-->~type html~<!--~}~-->.</p>
-       <p>Example:<br /><pre>
+       <p>Example:<br><pre>
 name      textbox
 phone     phone
 comments  textarea
@@ -41,7 +41,7 @@ agree     yesno</pre></p>
     <p>Fields: 
     <textarea rows="10" cols="40" name="fields">~fields html~</textarea></p>
 
-    <p><input type="submit" name="preview" value="Continue" /></p>
+    <p><input type="submit" name="preview" value="Continue"></p>
   </form>
 </body>
 </html>
index 7137fee..b88d454 100644 (file)
@@ -1,9 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title>Meta Form</title>
-  <link rel="stylesheet" href="code/wfpl/metaform/style.css" type="text/css" />
+  <link rel="stylesheet" href="code/wfpl/metaform/style.css" type="text/css">
 </head>
 
 <body>
   <h1 class="first">PREVIEW</h1>
 ~preview~
   </div>
-    <p><form action="~file_name~.tgz" method="get">~hiddens~<input type="submit" name="download_tar" value="Download tarball" /></form></p>
+    <p><form action="~file_name~.tgz" method="get">~hiddens~<input type="submit" name="download_tar" value="Download tarball"></form></p>
 
   <form action="~metaform_name~" method="get">
-    <p><!--~hiddens {~--><input type="hidden" name="file_name" value="~file_name attr~" /><input type="hidden" name="table_name" value="~table_name attr~" /><input type="hidden" name="singular" value="~singular attr~" /><input type="hidden" name="plural" value="~plural attr~" /><input type="hidden" name="opt_email" value="~opt_email yesno~" /><input type="hidden" name="opt_db" value="~opt_db yesno~" /><input type="hidden" name="opt_listing" value="~opt_listing yesno~" /><input type="hidden" name="opt_display" value="~opt_display yesno~" /><input type="hidden" name="opt_pass" value="~opt_pass yesno~" /><input type="hidden" name="fields" value="~fields attr~" /><!--~}~--><input type="submit" name="edit" value="Back to editing" /></p>
+    <p><!--~hiddens {~--><input type="hidden" name="file_name" value="~file_name attr~"><input type="hidden" name="table_name" value="~table_name attr~"><input type="hidden" name="singular" value="~singular attr~"><input type="hidden" name="plural" value="~plural attr~"><input type="hidden" name="opt_email" value="~opt_email yesno~"><input type="hidden" name="opt_db" value="~opt_db yesno~"><input type="hidden" name="opt_listing" value="~opt_listing yesno~"><input type="hidden" name="opt_display" value="~opt_display yesno~"><input type="hidden" name="opt_pass" value="~opt_pass yesno~"><input type="hidden" name="fields" value="~fields attr~"><!--~}~--><input type="submit" name="edit" value="Back to editing"></p>
 
-    <p><input type="submit" name="view_sql" value="View SQL" /></p>
+    <p><input type="submit" name="view_sql" value="View SQL"></p>
 
-    <p><input type="submit" name="view_php" value="View PHP" /></p>
+    <p><input type="submit" name="view_php" value="View PHP"></p>
 
-    <p><input type="submit" name="view_html" value="View HTML template" /></p>
+    <p><input type="submit" name="view_html" value="View HTML template"></p>
 
-    <p><input type="submit" name="view_email" value="View e-mail" /></p>
+    <p><input type="submit" name="view_email" value="View e-mail"></p>
 
   </form>
 </body>
index a5fb63e..58629d8 100644 (file)
@@ -1,9 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
        <title><!--~~title show {~~-->~plural cap~<!--~~}~~--></title>
-       <link rel="stylesheet" href="style.css" type="text/css" /><!--~html_editor_headers {~--><!--~~extra_headers {~~-->
+       <link rel="stylesheet" href="style.css" type="text/css"><!--~html_editor_headers {~--><!--~~extra_headers {~~-->
        <script type="text/javascript" src="code/tiny_mce/tiny_mce.js"></script>
        <script language="javascript" type="text/javascript">
 //<![CDATA[
@@ -41,7 +41,7 @@
                <!--~~}~~-->
                                <p style="font-size: 120%; padding: 5px; margin: 0px">~~data html~~</p>
                <!--~~ sep {~~-->
-                               <hr />
+                               <hr>
                <!--~~}~~-->
                <!--~~ last {~~-->
                        </div>
@@ -55,7 +55,7 @@
 
                <table border="0" cellpadding="3" cellspacing="0" summary="">
 <!--~display_row {~--><!--~display_image {~-->
-                       <tr><td class="caption">~caption html~:</td><td><img src="~~~name~ image_src~~" width="~~~name~ image_width~~" height="~~~name~ image_height~~" alt="" /></td></tr>
+                       <tr><td class="caption">~caption html~:</td><td><img src="~~~name~ image_src~~" width="~~~name~ image_width~~" height="~~~name~ image_height~~" alt=""></td></tr>
 <!--~}~--><!--~display_yesno {~-->
                        <tr><td class="caption">~caption html~:</td><td>~~~name~ yesno~~</td></tr>
 <!--~}~--><!--~display_date {~-->
        <!--~~form {~~--><!--~form {~-->
                <h2><!--~opt_db {~--><!--~~new_msg {~~-->Add a new ~singular~<!--~~}~~--><!--~~edit_msg {~~-->Edit ~singular~ "~~~always_field~ html~~"<!--~~}~~--><!--~}~--><!--~opt_db_else {~-->Submit a ~singular~<!--~}~--></h2>
 
-               <form action="~file_name~" method="post~enctype_attr~"><!--~opt_db {~--><!--~~editing {~~--><div style="display: none"><input type="hidden" name="~file_name~_edit_id" value="~~~file_name~_edit_id attr~~" /></div><!--~~}~~--><!--~}~--><!--~uploads {~--><input type="hidden" name="MAX_FILE_SIZE" value="~~upload_max_filesize~~" /><!--~}~-->
+               <form action="~file_name~" method="post~enctype_attr~"><!--~opt_db {~--><!--~~editing {~~--><div style="display: none"><input type="hidden" name="~file_name~_edit_id" value="~~~file_name~_edit_id attr~~"></div><!--~~}~~--><!--~}~--><!--~uploads {~--><input type="hidden" name="MAX_FILE_SIZE" value="~~upload_max_filesize~~"><!--~}~-->
 <!--~row {~--><!--~image {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="file" name="~name~" /><input type="hidden" name="old_~name~" value="~~~name~ attr~~" /></div><!--~}~--><!--~file {~-->
+                       <div class="field"><input type="file" name="~name~"><input type="hidden" name="old_~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~file {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="file" name="~name~" /><input type="hidden" name="old_~name~" value="~~~name~ attr~~" /></div><!--~}~--><!--~textbox {~-->
+                       <div class="field"><input type="file" name="~name~"><input type="hidden" name="old_~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~textbox {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="text" name="~name~" value="~~~name~ attr~~" /></div><!--~}~--><!--~date {~-->
+                       <div class="field"><input type="text" name="~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~date {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="text" name="~name~" value="~~~name~ mmddyyyy attr~~" /> mm/dd/yyyy</div><!--~}~--><!--~password {~-->
+                       <div class="field"><input type="text" name="~name~" value="~~~name~ mmddyyyy attr~~"> mm/dd/yyyy</div><!--~}~--><!--~password {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="password" name="~name~" value="" /></div><!--~}~--><!--~textarea {~-->
+                       <div class="field"><input type="password" name="~name~" value=""></div><!--~}~--><!--~textarea {~-->
                        <div class="caption">~caption html~</div>
                        <div class="field"><textarea rows="9" cols="22" name="~name~">~~~name~ html~~</textarea></div><!--~}~--><!--~html {~-->
                        <div class="caption">~caption html~</div>
                        <div class="caption">~caption html~</div>
                        <div class="field"><select name="~name~"><option value="">Choose One:</option><!--~~~name~ states~~--></select></div><!--~}~--><!--~radio {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="radio" name="~name~~~~name~ checked~~" /></div><!--~}~--><!--~checkbox {~-->
-                       <div class="caption"><input type="checkbox" name="~name~~~~name~ checked~~" /> ~caption html~</div>
+                       <div class="field"><input type="radio" name="~name~~~~name~ checked~~"></div><!--~}~--><!--~checkbox {~-->
+                       <div class="caption"><input type="checkbox" name="~name~~~~name~ checked~~"> ~caption html~</div>
                        <div class="field"></div><!--~}~--><!--~submit {~-->
                        <div class="caption">&nbsp;</div>
-                       <div class="field"><input type="submit" name="~name~" value="~caption attr~" /></div><!--~}~-->
+                       <div class="field"><input type="submit" name="~name~" value="~caption attr~"></div><!--~}~-->
 <!--~}~-->
                </form>
        <!--~}~--><!--~~}~~--><!--~opt_listing {~-->
                        <table cellspacing="0" cellpadding="4" border="1" summary="">
                                <!--~listing_head_col {~--><th>~caption~</th><!--~}~--><th>&nbsp;</th><!--~~rows {~~-->
                                <tr><!--~listing_row_col {~-->
-                                       <td class="listing"><a href="~file_name~?~file_name~_<!--~opt_display_else {~-->edit_<!--~}~-->id=~~id~~"><!--~listing_value_enc {~-->~~~name~ ~listing_enc~~~<!--~}~--><!--~listing_value_thumb {~--><img src="~~~name~ thumb_src~~" width="~~~name~ thumb_width~~" height="~~~name~ thumb_height~~" alt="" /><!--~}~--></a></td><!--~}~-->
+                                       <td class="listing"><a href="~file_name~?~file_name~_<!--~opt_display_else {~-->edit_<!--~}~-->id=~~id~~"><!--~listing_value_enc {~-->~~~name~ ~listing_enc~~~<!--~}~--><!--~listing_value_thumb {~--><img src="~~~name~ thumb_src~~" width="~~~name~ thumb_width~~" height="~~~name~ thumb_height~~" alt=""><!--~}~--></a></td><!--~}~-->
                                        <td><a href="~file_name~?~file_name~_delete_id=~~id~~" onclick="return confirm('Permanently delete?')">[delete this ~singular~]</a></td>
                                </tr><!--~~}~~-->
 
diff --git a/run.php b/run.php
index 32aebef..8c780de 100644 (file)
--- a/run.php
+++ b/run.php
@@ -119,7 +119,7 @@ function run_php($dest = false) {
                        run_php('error_404');
                        return;
                } else {
-                       echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
+                       echo '<!DOCTYPE html><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
                        exit();
                }
        }
index 333ba75..5e23216 100644 (file)
--- a/run2.php
+++ b/run2.php
@@ -116,7 +116,7 @@ function run_php($dest = false) {
                        run_php('404');
                        return;
                } else {
-                       echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
+                       echo '<!DOCTYPE html><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
                        exit();
                }
        }
index 5361385..aa3749e 100644 (file)
@@ -1,6 +1,6 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title>testing code/wfpl/session.php</title>
 </head>
index 6da95d7..385cecb 100644 (file)
@@ -1,9 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
 <!-- This file is an example template for wfpl/template.php. It contains two
 special things: sub-templates and template tags. -->
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title></title>
 </head>
@@ -32,7 +32,7 @@ special things: sub-templates and template tags. -->
                putting it in a text file or e-mail then leave the encoding off and
                just put ~user~. -->
 
-        <td><input type="text" name="user" value="~user.attr~" /></td>
+        <td><input type="text" name="user" value="~user.attr~"></td>
       </tr>
 
       <tr>
@@ -40,11 +40,11 @@ special things: sub-templates and template tags. -->
 
         <!-- there's another template tag named pass -->
 
-        <td><input type="password" name="pass" value="~pass.attr~" /></td>
+        <td><input type="password" name="pass" value="~pass.attr~"></td>
       </tr>
 
       <tr>
-        <td colspan="2"><input type="submit" value="Log In" /></td>
+        <td colspan="2"><input type="submit" value="Log In"></td>
       </tr>
     </table>
   </form>
@@ -78,7 +78,7 @@ special things: sub-templates and template tags. -->
          It's simply asking PHP for a value called "foo" encoded as html -->
       <td>~foo.html~</td>
 
-      <td><input value="~bar.attr~" /></td>
+      <td><input value="~bar.attr~"></td>
     </tr>
     <!-- Here's the end of foobar_row -->
     <!--~end~-->
@@ -86,7 +86,7 @@ special things: sub-templates and template tags. -->
     <tr>
       <td></td>
       
-      <td><input type="submit" /></td>
+      <td><input type="submit"></td>
     </tr>
 
   </table>
index 55b242f..9a61084 100644 (file)
@@ -1,10 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title>wfpl unit test results</title>
-  <meta name="robots" content="none" />
+  <meta name="robots" content="none">
   <style type="text/css">
     .row_even, .row_odd {
       font: 14px monospace;
index f52f0cf..5d5c8a0 100644 (file)
@@ -34,9 +34,9 @@
 # Example:
 # 
 # <form action="foo.php" enctype="multipart/form-data" method="post">
-# <input type="hidden" name="MAX_FILE_SIZE" value="2097152" />
-# <input type="file" name="photo" />
-# <input type="submit" name="save" value="Save" />
+# <input type="hidden" name="MAX_FILE_SIZE" value="2097152">
+# <input type="file" name="photo">
+# <input type="submit" name="save" value="Save">
 # </form>
 # 
 # #######
@@ -152,7 +152,7 @@ function generate_filename($path, $mime = 'text/plain') {
 # the client's name appended. Otherwise $path will be used as the filename
 # exactly as is, even if extensions differ between the client's name and $path.
 #
-# where user uploads "c:\foo\Bar baz.PDF" at <input name="in" type="file" />
+# where user uploads "c:\foo\Bar baz.PDF" at <input name="in" type="file">
 #    save_uploaded_file('in', 'uploaded_pdfs/'); yeilds:
 #       "uploaded_pdfs/bar_baz.pdf"
 #    save_uploaded_file('in', 'uploaded_pdfs/prefix.'); yeilds:
index 2ad8695..3f0e610 100644 (file)
@@ -1,7 +1,6 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title></title>
 </head>
@@ -10,9 +9,9 @@
 <!--~main start~-->
   <div id="wfpl_progress_form">
     <form action="http://~host~:~port~/~filename~" enctype="multipart/form-data" target="wfpl_progress_post_response" method="post">
-      <p>Upload a file: <input type="file" name="wfpl_uploader_file" id="wfpl_uploader_file" /></p>
+      <p>Upload a file: <input type="file" name="wfpl_uploader_file" id="wfpl_uploader_file"></p>
 
-      <p><input type="submit" onclick="submitting()" value="Submit" /></p>
+      <p><input type="submit" onclick="submitting()" value="Submit"></p>
     </form>
   </div>