Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fixes to the <base> addition to the HTML header so that it works correctly with the "doc" webpage. Href is now $baseurl/$current_page. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | wysiwyg |
Files: | files | file ages | folders |
SHA1: |
fd10cdbaf8c759127add463eff960e77 |
User & Date: | drh 2012-08-13 12:30:18.966 |
Context
2012-08-13
| ||
12:54 | Disable the cut/copy/paste buttons on the WYSIWYG editor, since doing cut/copy/paste under javascript control is normally disallowed for security reasons. ... (Closed-Leaf check-in: e5ad1037 user: drh tags: wysiwyg) | |
12:30 | Fixes to the <base> addition to the HTML header so that it works correctly with the "doc" webpage. Href is now $baseurl/$current_page. ... (check-in: fd10cdba user: drh tags: wysiwyg) | |
2012-08-11
| ||
22:25 | Add confirmation dialog boxes when changing between markup and wysisyg editor mode, and before cancelling an edit. ... (check-in: cb6804a2 user: drh tags: wysiwyg) | |
Changes
Changes to src/doc.c.
︙ | ︙ | |||
368 369 370 371 372 373 374 375 376 377 378 379 380 381 | if( !g.perm.Read ){ login_needed(); return; } zName = PD("name", "tip/index.wiki"); for(i=0; zName[i] && zName[i]!='/'; i++){} if( zName[i]==0 || i>UUID_SIZE ){ zName = "index.html"; goto doc_not_found; } memcpy(zBaseline, zName, i); zBaseline[i] = 0; zName += i; while( zName[0]=='/' ){ zName++; } if( !file_is_simple_pathname(zName) ){ int n = strlen(zName); if( n>0 && zName[n-1]=='/' ){ | > | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | if( !g.perm.Read ){ login_needed(); return; } zName = PD("name", "tip/index.wiki"); for(i=0; zName[i] && zName[i]!='/'; i++){} if( zName[i]==0 || i>UUID_SIZE ){ zName = "index.html"; goto doc_not_found; } g.zPath = mprintf("%s/%s", g.zPath, zName); memcpy(zBaseline, zName, i); zBaseline[i] = 0; zName += i; while( zName[0]=='/' ){ zName++; } if( !file_is_simple_pathname(zName) ){ int n = strlen(zName); if( n>0 && zName[n-1]=='/' ){ |
︙ | ︙ |
Changes to src/setup.c.
︙ | ︙ | |||
60 61 62 63 64 65 66 | style_header("Server Administration"); /* Make sure the header contains <base href="...">. Issue a warning ** if it does not. */ if( !cgi_header_contains("<base href=") ){ @ <p class="generalError"><b>Configuration Error:</b> Please add | | | | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | style_header("Server Administration"); /* Make sure the header contains <base href="...">. Issue a warning ** if it does not. */ if( !cgi_header_contains("<base href=") ){ @ <p class="generalError"><b>Configuration Error:</b> Please add @ <tt><base href="$baseurl/$current_page"></tt> after @ <tt><head></tt> in the <a href="setup_header">HTML header</a>!</p> } @ <table border="0" cellspacing="7"> setup_menu_entry("Users", "setup_ulist", "Grant privileges to individual users."); setup_menu_entry("Access", "setup_access", "Control access settings."); |
︙ | ︙ | |||
1362 1363 1364 1365 1366 1367 1368 | }else if( P("fixbase")!=0 ){ const char *z = db_get("header", (char*)zDefaultHeader); char *zHead = strstr(z, "<head>"); if( strstr(z, "<base href=")==0 && zHead!=0 ){ char *zNew; char *zTail = &zHead[6]; while( fossil_isspace(zTail[0]) ) zTail++; | | | | | 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 | }else if( P("fixbase")!=0 ){ const char *z = db_get("header", (char*)zDefaultHeader); char *zHead = strstr(z, "<head>"); if( strstr(z, "<base href=")==0 && zHead!=0 ){ char *zNew; char *zTail = &zHead[6]; while( fossil_isspace(zTail[0]) ) zTail++; zNew = mprintf("%.*s\n<base href=\"$baseurl/$current_page\" />\n%s", zHead+6-z, z, zTail); cgi_replace_parameter("header", zNew); db_set("header", zNew, 0); } } style_header("Edit Page Header"); @ <form action="%R/setup_header" method="post"><div> /* Make sure the header contains <base href="...">. Issue a warning ** if it does not. */ if( !cgi_header_contains("<base href=") ){ @ <p class="generalError">Please add @ <tt><base href="$baseurl/$current_page"></tt> after @ <tt><head></tt> in the header! @ <input type="submit" name="fixbase" value="Add <base> Now"></p> } login_insert_csrf_secret(); @ <p>Edit HTML text with embedded TH1 (a TCL dialect) that will be used to @ generate the beginning of every page through start of the main @ menu.</p> |
︙ | ︙ |
Changes to src/skins.c.
︙ | ︙ | |||
154 155 156 157 158 159 160 | @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> | | | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> @ <base href="$baseurl/$current_page" /> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$home/timeline.rss"> @ <link rel="stylesheet" href="$home/style.css?blackwhite" type="text/css" @ media="screen"> @ </head> @ <body> |
︙ | ︙ | |||
357 358 359 360 361 362 363 | @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> | | | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> @ <base href="$baseurl/$current_page" /> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$home/timeline.rss"> @ <link rel="stylesheet" href="$home/style.css?tan" type="text/css" @ media="screen"> @ </head> @ <body> |
︙ | ︙ | |||
594 595 596 597 598 599 600 | @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> | | | 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> @ <base href="$baseurl/$current_page" /> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$home/timeline.rss"> @ <link rel="stylesheet" href="$home/style.css?black2" type="text/css" @ media="screen"> @ </head> @ <body> |
︙ | ︙ | |||
893 894 895 896 897 898 899 | @ } @ @ textarea { @ font-size: 1em; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> | | | 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 | @ } @ @ textarea { @ font-size: 1em; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> @ <base href="$baseurl/$current_page" /> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$home/timeline.rss"> @ <link rel="stylesheet" href="$home/style.css?black2" type="text/css" @ media="screen"> @ </head> @ <body> |
︙ | ︙ |