Hi, A patch to include DOCTYPE html (HTML5) in web GUI where missing. Also deleted </input> tags (which are XHTML specific, and invalid in HTML5).
Best Regards, Johan
Index: ajax/index.html ================================================================== --- ajax/index.html +++ ajax/index.html @@ -1,11 +1,11 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<!DOCTYPE html> +<html lang="en"> <head> <title>Fossil/JSON raw request sending</title> - <meta http-equiv="content-type" content="text/html;charset=utf-8" /> + <meta http-equiv="content-type" content="text/html;charset=utf-8" > <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript" src="js/whajaj.js"></script> <script type="text/javascript" src="js/fossil-ajaj.js"></script> <style type='text/css'> @@ -211,99 +211,99 @@ </div><!-- #headerArea --> See also: <a href='wiki-editor.html'>prototype wiki editor</a>. <h2>Request...</h2> -Path: <input type='text' size='40' id='textPath' value='/json/HAI'/> -<input type='button' value='Send...' id='btnSend' onclick='TheApp.sendRequest()' /><br/> +Path: <input type='text' size='40' id='textPath' value='/json/HAI'> +<input type='button' value='Send...' id='btnSend' onclick='TheApp.sendRequest()' ><br> If the POST textarea is not empty then it will be posted with the request. -<hr/> -<strong>Quick-posts:</strong><br/> -<input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> -<input type='button' value='HAI JSONP' onclick='TheApp.cgi.sendCommand("/json/HAI",undefined,{jsonp:"myJsonPCallback"});' /> -<input type='button' value='version' onclick='TheApp.cgi.sendCommand("/json/version")' /> -<input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat?full=0")' /> -<input type='button' value='whoami' onclick='TheApp.cgi.whoami()' /> -<input type='button' value='cap' onclick='TheApp.cgi.sendCommand("/json/cap")' /> -<input type='button' value='resultCodes' onclick='TheApp.cgi.sendCommand("/json/resultCodes")' /> -<input type='button' value='g' onclick='TheApp.cgi.sendCommand("/json/g")' /> - -<br/> - -<input type='button' value='branch/list' onclick='TheApp.cgi.sendCommand("/json/branch/list")' /> -<input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' /> -<input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' /> -<input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' /> -<input type='button' value='timeline/branch' onclick='TheApp.cgi.sendCommand("/json/timeline/branch")' /> - -<br/> - -<input type='button' value='wiki/list' onclick='TheApp.cgi.sendCommand("/json/wiki/list")' /> -<input type='button' value='wiki/list verbose' onclick='TheApp.cgi.sendCommand("/json/wiki/list",{verbose:1})' /> -<input type='button' value='wiki/get Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get",{name:"Fossil"})' /> -<input type='button' value='wiki/get/Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get/Fossil")' /> -<input type='button' value='wiki/diff' onclick='TheApp.cgi.sendCommand("/json/wiki/diff/e32ccdcda59e930c77c/e15992f475760cdf3a9")' /> - -<br/> - -<input type='button' value='user/list' onclick='TheApp.cgi.sendCommand("/json/user/list")' /> -<input type='button' value='user/get' onclick='TheApp.cgi.sendCommand("/json/user/get?name=anonymous")' /> -<input type='button' value='tag/list' onclick='TheApp.cgi.sendCommand("/json/tag/list?includeTickets=false&raw=false")' /> -<input type='button' value='tag/list/json' onclick='TheApp.cgi.sendCommand("/json/tag/list/json?raw=false")' /> +<hr> +<strong>Quick-posts:</strong><br> +<input type='button' value='HAI' onclick='TheApp.cgi.HAI()' > +<input type='button' value='HAI JSONP' onclick='TheApp.cgi.sendCommand("/json/HAI",undefined,{jsonp:"myJsonPCallback"});' > +<input type='button' value='version' onclick='TheApp.cgi.sendCommand("/json/version")' > +<input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat?full=0")' > +<input type='button' value='whoami' onclick='TheApp.cgi.whoami()' > +<input type='button' value='cap' onclick='TheApp.cgi.sendCommand("/json/cap")' > +<input type='button' value='resultCodes' onclick='TheApp.cgi.sendCommand("/json/resultCodes")' > +<input type='button' value='g' onclick='TheApp.cgi.sendCommand("/json/g")' > + +<br> + +<input type='button' value='branch/list' onclick='TheApp.cgi.sendCommand("/json/branch/list")' > +<input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' > +<input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' > +<input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' > +<input type='button' value='timeline/branch' onclick='TheApp.cgi.sendCommand("/json/timeline/branch")' > + +<br> + +<input type='button' value='wiki/list' onclick='TheApp.cgi.sendCommand("/json/wiki/list")' > +<input type='button' value='wiki/list verbose' onclick='TheApp.cgi.sendCommand("/json/wiki/list",{verbose:1})' > +<input type='button' value='wiki/get Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get",{name:"Fossil"})' > +<input type='button' value='wiki/get/Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get/Fossil")' > +<input type='button' value='wiki/diff' onclick='TheApp.cgi.sendCommand("/json/wiki/diff/e32ccdcda59e930c77c/e15992f475760cdf3a9")' > + +<br> + +<input type='button' value='user/list' onclick='TheApp.cgi.sendCommand("/json/user/list")' > +<input type='button' value='user/get' onclick='TheApp.cgi.sendCommand("/json/user/get?name=anonymous")' > +<input type='button' value='tag/list' onclick='TheApp.cgi.sendCommand("/json/tag/list?includeTickets=false&raw=false")' > +<input type='button' value='tag/list/json' onclick='TheApp.cgi.sendCommand("/json/tag/list/json?raw=false")' > <input type='button' value='tag/add' - onclick='TheApp.cgi.sendCommand("/json/tag/add",{name:"json-add-tag-test",checkin:"json",value:"tag test",propagate:false,raw:false})' /> + onclick='TheApp.cgi.sendCommand("/json/tag/add",{name:"json-add-tag-test",checkin:"json",value:"tag test",propagate:false,raw:false})' > <input type='button' value='tag/cancel' - onclick='TheApp.cgi.sendCommand("/json/tag/cancel",{name:"json-add-tag-test",checkin:"json",raw:false})' /> + onclick='TheApp.cgi.sendCommand("/json/tag/cancel",{name:"json-add-tag-test",checkin:"json",raw:false})' > <input type='button' value='tag/find' - onclick='TheApp.cgi.sendCommand("/json/tag/find",{name:"json",type:"*",raw:false,limit:5})' /> + onclick='TheApp.cgi.sendCommand("/json/tag/find",{name:"json",type:"*",raw:false,limit:5})' > -<br/> +<br> <input type='button' value='diff' - onclick='TheApp.cgi.sendCommand("/json/diff",{v1:"b0e9b45baed6f885",v2:"5f225e261d836287",context:2})' /> + onclick='TheApp.cgi.sendCommand("/json/diff",{v1:"b0e9b45baed6f885",v2:"5f225e261d836287",context:2})' > <input type='button' value='diff/A/B' - onclick='TheApp.cgi.sendCommand("/json/diff/b0e9b45baed6f885/5f225e261d836287?context=2")' /> + onclick='TheApp.cgi.sendCommand("/json/diff/b0e9b45baed6f885/5f225e261d836287?context=2")' > <input type='button' value='query' - onclick='TheApp.cgi.sendCommand("/json/query?format=o","SELECT * from user")' /> + onclick='TheApp.cgi.sendCommand("/json/query?format=o","SELECT * from user")' > <input type='button' value='report list' - onclick='TheApp.cgi.sendCommand("/json/report/list")' /> + onclick='TheApp.cgi.sendCommand("/json/report/list")' > <input type='button' value='report get' - onclick='TheApp.cgi.sendCommand("/json/report/get",2)' /> + onclick='TheApp.cgi.sendCommand("/json/report/get",2)' > <input type='button' value='report run' - onclick='TheApp.cgi.sendCommand("/json/report/run",{"report":2,"format":"o"})' /> + onclick='TheApp.cgi.sendCommand("/json/report/run",{"report":2,"format":"o"})' > -<input type='button' value='config/get' onclick='TheApp.cgi.sendCommand("/json/config/get")' /> +<input type='button' value='config/get' onclick='TheApp.cgi.sendCommand("/json/config/get")' > <!-- not yet ready... -<input type='button' value='artifact/XYZ' onclick='TheApp.cgi.sendCommand("/json/artifact?uuid=json")' /> +<input type='button' value='artifact/XYZ' onclick='TheApp.cgi.sendCommand("/json/artifact?uuid=json")' > --> <!-- -<input type='button' value='get whiki' onclick='TheApp.cgi.getPages("whiki")' /> -<input type='button' value='get more' onclick='TheApp.cgi.getPages("HelloWorld/WhikiNews")' /> -<input type='button' value='get client data' onclick='TheApp.cgi.getPageClientData("HelloWorld/whiki/WhikiCommands")' /> -<input type='button' value='save client data' onclick='TheApp.cgi.savePageClientData({"HelloWorld":[1,3,5]})' /> +<input type='button' value='get whiki' onclick='TheApp.cgi.getPages("whiki")' > +<input type='button' value='get more' onclick='TheApp.cgi.getPages("HelloWorld/WhikiNews")' > +<input type='button' value='get client data' onclick='TheApp.cgi.getPageClientData("HelloWorld/whiki/WhikiCommands")' > +<input type='button' value='save client data' onclick='TheApp.cgi.savePageClientData({"HelloWorld":[1,3,5]})' > --> -<hr/> +<hr> <b>Login:</b> -<br/> -<input type='button' value='Anon. PW' onclick='TheApp.cgi.sendCommand("/json/anonymousPassword")' /> -<input type='button' value='Anon. PW+Login' onclick='TheApp.cgi.login()' /> -<br/> -name:<input type='text' id='textUser' value='json-demo' size='12'/> -pw:<input type='password' id='textPassword' value='json-demo' size='12'/> -<input type='button' value='login' onclick='TheApp.cgi.login(jQuery("#textUser").val(),jQuery("#textPassword").val(),{onResponse:TheApp.onLogin})' /> -<input type='button' value='logout' onclick='TheApp.cgi.logout()' /> -<br/> +<br> +<input type='button' value='Anon. PW' onclick='TheApp.cgi.sendCommand("/json/anonymousPassword")' > +<input type='button' value='Anon. PW+Login' onclick='TheApp.cgi.login()' > +<br> +name:<input type='text' id='textUser' value='json-demo' size='12'> +pw:<input type='password' id='textPassword' value='json-demo' size='12'> +<input type='button' value='login' onclick='TheApp.cgi.login(jQuery("#textUser").val(),jQuery("#textPassword").val(),{onResponse:TheApp.onLogin})' > +<input type='button' value='logout' onclick='TheApp.cgi.logout()' > +<br> <span id='currentAuthToken' style='font-family:monospaced'></span> -<br/> +<br> -<hr/> +<hr> <table> <tr> <th>POST data</th> <th>Request AJAJ options</th> Index: ajax/wiki-editor.html ================================================================== --- ajax/wiki-editor.html +++ ajax/wiki-editor.html @@ -1,11 +1,11 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<!DOCTYPE html> +<html lang="en"> <head> <title>Fossil/JSON Wiki Editor Prototype</title> - <meta http-equiv="content-type" content="text/html;charset=utf-8" /> + <meta http-equiv="content-type" content="text/html;charset=utf-8" > <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="js/whajaj.js"></script> <script type="text/javascript" src="js/fossil-ajaj.js"></script> <style type='text/css'> @@ -232,11 +232,11 @@ return link; } list.sort(); for( i = 0; i < list.length; ++i ){ tgt.append(makeLink(list[i])); - tgt.append('<br/>'); + tgt.append('<br>'); } }; TheApp.loadPageList = function(){ TheApp.cgi.sendCommand('/json/wiki/list',null,{ @@ -319,51 +319,51 @@ See also: <a href='index.html'>main test page</a>. <br> <b>Login:</b> -<br/> -<input type='button' value='Anon. Login' onclick='TheApp.cgi.login()' /> +<br> +<input type='button' value='Anon. Login' onclick='TheApp.cgi.login()' > or: -name:<input type='text' id='textUser' value='json-demo' size='12'/> -pw:<input type='password' id='textPassword' value='json-demo' size='12'/> -<input type='button' value='login' onclick='TheApp.cgi.login(jQuery("#textUser").val(),jQuery("#textPassword").val(),{onResponse:TheApp.onLogin})' /> -<input type='button' value='logout' onclick='TheApp.cgi.logout()' /> +name:<input type='text' id='textUser' value='json-demo' size='12'> +pw:<input type='password' id='textPassword' value='json-demo' size='12'> +<input type='button' value='login' onclick='TheApp.cgi.login(jQuery("#textUser").val(),jQuery("#textPassword").val(),{onResponse:TheApp.onLogin})' > +<input type='button' value='logout' onclick='TheApp.cgi.logout()' > -<br/> +<br> <span id='currentAuthToken' style='font-family:monospaced'></span> -<hr/> -<strong>Quick-posts:</strong><br/> -<input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> -<input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat")' /> -<input type='button' value='whoami' onclick='TheApp.cgi.whoami()' /> -<input type='button' value='wiki/list' onclick='TheApp.loadPageList()' /> +<hr> +<strong>Quick-posts:</strong><br> +<input type='button' value='HAI' onclick='TheApp.cgi.HAI()' > +<input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat")' > +<input type='button' value='whoami' onclick='TheApp.cgi.whoami()' > +<input type='button' value='wiki/list' onclick='TheApp.loadPageList()' > <!-- -<input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci")' /> +<input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci")' > --> <!-- -<input type='button' value='get whiki' onclick='TheApp.cgi.getPages("whiki")' /> -<input type='button' value='get more' onclick='TheApp.cgi.getPages("HelloWorld/WhikiNews")' /> -<input type='button' value='get client data' onclick='TheApp.cgi.getPageClientData("HelloWorld/whiki/WhikiCommands")' /> -<input type='button' value='save client data' onclick='TheApp.cgi.savePageClientData({"HelloWorld":[1,3,5]})' /> +<input type='button' value='get whiki' onclick='TheApp.cgi.getPages("whiki")' > +<input type='button' value='get more' onclick='TheApp.cgi.getPages("HelloWorld/WhikiNews")' > +<input type='button' value='get client data' onclick='TheApp.cgi.getPageClientData("HelloWorld/whiki/WhikiCommands")' > +<input type='button' value='save client data' onclick='TheApp.cgi.savePageClientData({"HelloWorld":[1,3,5]})' > --> -<hr/> +<hr> <table> <tr> <th>Page List</th> <th>Content <span id='spanPageName'></span></th> </tr> <tr> <td width='25%' valign='top'> - <input type='button' value='Create new...' onclick='TheApp.createNewPage()' /><br/> + <input type='button' value='Create new...' onclick='TheApp.createNewPage()' ><br> <div id='pageListArea'></div> </td> <td width='75%' valign='top'> - <input type='button' value='Save' onclick='TheApp.savePage()' /><br/> + <input type='button' value='Save' onclick='TheApp.savePage()' ><br> <textarea id='taPageContent' rows='20' cols='60'></textarea> </td> </tr> <tr> <th colspan='2'>Response <span id='timer'></span></th> Index: src/cgi.c ================================================================== --- src/cgi.c +++ src/cgi.c @@ -419,11 +419,11 @@ }else{ zLocation = mprintf("Location: %s/%s\r\n", g.zBaseURL, zURL); } cgi_append_header(zLocation); cgi_reset_content(); - cgi_printf("<html>\n<p>Redirect to %h</p>\n</html>\n", zLocation); + cgi_printf("<!DOCTYPE html>\n<html lang=\"en\">\n<title>Redirect to %h</title>\n<p>Redirect to %h</p>\n</html>\n", zLocation, zLocation); cgi_set_status(iStat, zStat); free(zLocation); cgi_reply(); fossil_exit(0); } Index: src/markdown_html.c ================================================================== --- src/markdown_html.c +++ src/markdown_html.c @@ -14,11 +14,11 @@ ** http://www.hwaci.com/drh/ ** ******************************************************************************* ** ** This file contains callbacks for the markdown parser that generate -** XHTML output. +** HTML5 output. */ #include "config.h" #include "markdown_html.h" Index: src/printf.c ================================================================== --- src/printf.c +++ src/printf.c @@ -1060,11 +1060,11 @@ else #endif { if( g.cgiOutput ){ g.cgiOutput = 0; - cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z); + cgi_printf("<!DOCTYPE html>\n<html lang=\"en\">\n<title>%h</title>\n<p class=\"generalError\">\n%h\n</p>\n</html>\n", z, z); cgi_reply(); }else if( !g.fQuiet ){ fossil_force_newline(); fossil_trace("%s\n", z); } Index: src/search.c ================================================================== --- src/search.c +++ src/search.c @@ -1809,12 +1809,17 @@ int id; int cnt = 0; login_check_credentials(); if( !g.perm.Admin ){ login_needed(0); return; } if( !search_index_exists() ){ - @ <p>Indexed search is disabled + @ <!DOCTYPE html> + @ <html lang="en"> + @ <head><title>Indexed search is disabled</title></head> + @ <body> + @ <p>Indexed search is disabled</p> style_footer(); + @ </body></html> return; } if( zId!=0 && (id = atoi(zId))>0 ){ /* Show information about a single ftsdocs entry */ style_header("Information about ftsdoc entry %d", id); Index: src/shell.c ================================================================== --- src/shell.c +++ src/shell.c @@ -1457,11 +1457,11 @@ */ #define MODE_Line 0 /* One column per line. Blank line between records */ #define MODE_Column 1 /* One record per line in neat columns */ #define MODE_List 2 /* One record per line with a separator */ #define MODE_Semi 3 /* Same as MODE_List but append ";" to each line */ -#define MODE_Html 4 /* Generate an XHTML table */ +#define MODE_Html 4 /* Generate an HTML5 table */ #define MODE_Insert 5 /* Generate SQL "insert" statements */ #define MODE_Quote 6 /* Quote values as for SQL */ #define MODE_Tcl 7 /* Generate ANSI-C or TCL quoted elements */ #define MODE_Csv 8 /* Quote strings, numbers are plain */ #define MODE_Explain 9 /* Like MODE_Column, but do not truncate data */ Index: src/style.c ================================================================== --- src/style.c +++ src/style.c @@ -1641,7 +1641,11 @@ ** WEBPAGE: honeypot ** This page is a honeypot for spiders and bots. */ void honeypot_page(void){ cgi_set_status(403, "Forbidden"); - @ <p>Please enable javascript or log in to see this content</p> + @ <!DOCTYPE html> + @ <html lang="en"> + @ <head><title>Please enable javascript or log in to see this content</title></head> + @ <body><p>Please enable javascript or log in to see this content</p></body> + @ </html> } Index: src/user.c ================================================================== --- src/user.c +++ src/user.c @@ -716,26 +716,26 @@ @ </tbody></table> db_finalize(&q); @ <hr /> @ <form method="post" action="%s(g.zTop)/access_log"> @ <label><input type="checkbox" name="delold"> - @ Delete all but the most recent 200 entries</input></label> - @ <input type="submit" name="deloldbtn" value="Delete"></input> + @ Delete all but the most recent 200 entries</label> + @ <input type="submit" name="deloldbtn" value="Delete"> @ </form> @ <form method="post" action="%s(g.zTop)/access_log"> @ <label><input type="checkbox" name="delanon"> - @ Delete all entries for user "anonymous"</input></label> - @ <input type="submit" name="delanonbtn" value="Delete"></input> + @ Delete all entries for user "anonymous"</label> + @ <input type="submit" name="delanonbtn" value="Delete"> @ </form> @ <form method="post" action="%s(g.zTop)/access_log"> @ <label><input type="checkbox" name="delfail"> - @ Delete all failed login attempts</input></label> - @ <input type="submit" name="delfailbtn" value="Delete"></input> + @ Delete all failed login attempts</label> + @ <input type="submit" name="delfailbtn" value="Delete"> @ </form> @ <form method="post" action="%s(g.zTop)/access_log"> @ <label><input type="checkbox" name="delall"> - @ Delete all entries</input></label> - @ <input type="submit" name="delallbtn" value="Delete"></input> + @ Delete all entries</label> + @ <input type="submit" name="delallbtn" value="Delete"> @ </form> output_table_sorting_javascript("logtable", "Ttt", 1); style_footer(); }
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users