Fossil SCM
More consistancy in html generation: Use '"' where possible.
Commit
34fcb9634e54a919be10b88d4c4664e62ddcf461
Parent
fb07d8693efc99a…
4 files changed
+11
-11
+1
-1
+4
-4
+3
-3
+11
-11
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -607,43 +607,43 @@ | ||
| 607 | 607 | @ <div class="sectionmenu"> |
| 608 | 608 | showDiff = g.zPath[0]!='c'; |
| 609 | 609 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 610 | 610 | showDiff = !showDiff; |
| 611 | 611 | if( showDiff ){ |
| 612 | - @ %z(xhref("class='button'","%R/vinfo/%T",zName)) | |
| 612 | + @ %z(xhref("class=\"button\"","%R/vinfo/%T",zName)) | |
| 613 | 613 | @ hide diffs</a> |
| 614 | 614 | if( sideBySide ){ |
| 615 | - @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName)) | |
| 615 | + @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName)) | |
| 616 | 616 | @ unified diffs</a> |
| 617 | 617 | }else{ |
| 618 | - @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName)) | |
| 618 | + @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName)) | |
| 619 | 619 | @ side-by-side diffs</a> |
| 620 | 620 | } |
| 621 | 621 | }else{ |
| 622 | - @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName)) | |
| 622 | + @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName)) | |
| 623 | 623 | @ show unified diffs</a> |
| 624 | - @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName)) | |
| 624 | + @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName)) | |
| 625 | 625 | @ show side-by-side diffs</a> |
| 626 | 626 | } |
| 627 | 627 | }else{ |
| 628 | 628 | if( showDiff ){ |
| 629 | - @ %z(xhref("class='button'","%R/ci/%T",zName))hide diffs</a> | |
| 629 | + @ %z(xhref("class=\"button\"","%R/ci/%T",zName))hide diffs</a> | |
| 630 | 630 | if( sideBySide ){ |
| 631 | - @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName)) | |
| 631 | + @ %z(xhref("class=\"button\"","%R/info/%T?sbs=0",zName)) | |
| 632 | 632 | @ unified diffs</a> |
| 633 | 633 | }else{ |
| 634 | - @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName)) | |
| 634 | + @ %z(xhref("class=\"button\"","%R/info/%T?sbs=1",zName)) | |
| 635 | 635 | @ side-by-side diffs</a> |
| 636 | 636 | } |
| 637 | 637 | }else{ |
| 638 | - @ %z(xhref("class='button'","%R/vinfo/%T?sbs=0",zName)) | |
| 638 | + @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=0",zName)) | |
| 639 | 639 | @ show unified diffs</a> |
| 640 | - @ %z(xhref("class='button'","%R/vinfo/%T?sbs=1",zName)) | |
| 640 | + @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=1",zName)) | |
| 641 | 641 | @ show side-by-side diffs</a> |
| 642 | 642 | } |
| 643 | 643 | } |
| 644 | - @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid)) | |
| 644 | + @ %z(xhref("class=\"button\"","%R/vpatch?from=%S&to=%S",zParent,zUuid)) | |
| 645 | 645 | @ patch</a></div> |
| 646 | 646 | db_prepare(&q, |
| 647 | 647 | "SELECT name," |
| 648 | 648 | " mperm," |
| 649 | 649 | " (SELECT uuid FROM blob WHERE rid=mlink.pid)," |
| 650 | 650 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -607,43 +607,43 @@ | |
| 607 | @ <div class="sectionmenu"> |
| 608 | showDiff = g.zPath[0]!='c'; |
| 609 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 610 | showDiff = !showDiff; |
| 611 | if( showDiff ){ |
| 612 | @ %z(xhref("class='button'","%R/vinfo/%T",zName)) |
| 613 | @ hide diffs</a> |
| 614 | if( sideBySide ){ |
| 615 | @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName)) |
| 616 | @ unified diffs</a> |
| 617 | }else{ |
| 618 | @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName)) |
| 619 | @ side-by-side diffs</a> |
| 620 | } |
| 621 | }else{ |
| 622 | @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName)) |
| 623 | @ show unified diffs</a> |
| 624 | @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName)) |
| 625 | @ show side-by-side diffs</a> |
| 626 | } |
| 627 | }else{ |
| 628 | if( showDiff ){ |
| 629 | @ %z(xhref("class='button'","%R/ci/%T",zName))hide diffs</a> |
| 630 | if( sideBySide ){ |
| 631 | @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName)) |
| 632 | @ unified diffs</a> |
| 633 | }else{ |
| 634 | @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName)) |
| 635 | @ side-by-side diffs</a> |
| 636 | } |
| 637 | }else{ |
| 638 | @ %z(xhref("class='button'","%R/vinfo/%T?sbs=0",zName)) |
| 639 | @ show unified diffs</a> |
| 640 | @ %z(xhref("class='button'","%R/vinfo/%T?sbs=1",zName)) |
| 641 | @ show side-by-side diffs</a> |
| 642 | } |
| 643 | } |
| 644 | @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid)) |
| 645 | @ patch</a></div> |
| 646 | db_prepare(&q, |
| 647 | "SELECT name," |
| 648 | " mperm," |
| 649 | " (SELECT uuid FROM blob WHERE rid=mlink.pid)," |
| 650 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -607,43 +607,43 @@ | |
| 607 | @ <div class="sectionmenu"> |
| 608 | showDiff = g.zPath[0]!='c'; |
| 609 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 610 | showDiff = !showDiff; |
| 611 | if( showDiff ){ |
| 612 | @ %z(xhref("class=\"button\"","%R/vinfo/%T",zName)) |
| 613 | @ hide diffs</a> |
| 614 | if( sideBySide ){ |
| 615 | @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName)) |
| 616 | @ unified diffs</a> |
| 617 | }else{ |
| 618 | @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName)) |
| 619 | @ side-by-side diffs</a> |
| 620 | } |
| 621 | }else{ |
| 622 | @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName)) |
| 623 | @ show unified diffs</a> |
| 624 | @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName)) |
| 625 | @ show side-by-side diffs</a> |
| 626 | } |
| 627 | }else{ |
| 628 | if( showDiff ){ |
| 629 | @ %z(xhref("class=\"button\"","%R/ci/%T",zName))hide diffs</a> |
| 630 | if( sideBySide ){ |
| 631 | @ %z(xhref("class=\"button\"","%R/info/%T?sbs=0",zName)) |
| 632 | @ unified diffs</a> |
| 633 | }else{ |
| 634 | @ %z(xhref("class=\"button\"","%R/info/%T?sbs=1",zName)) |
| 635 | @ side-by-side diffs</a> |
| 636 | } |
| 637 | }else{ |
| 638 | @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=0",zName)) |
| 639 | @ show unified diffs</a> |
| 640 | @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=1",zName)) |
| 641 | @ show side-by-side diffs</a> |
| 642 | } |
| 643 | } |
| 644 | @ %z(xhref("class=\"button\"","%R/vpatch?from=%S&to=%S",zParent,zUuid)) |
| 645 | @ patch</a></div> |
| 646 | db_prepare(&q, |
| 647 | "SELECT name," |
| 648 | " mperm," |
| 649 | " (SELECT uuid FROM blob WHERE rid=mlink.pid)," |
| 650 |
+1
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -549,11 +549,11 @@ | ||
| 549 | 549 | ); |
| 550 | 550 | @ <ul> |
| 551 | 551 | while( db_step(&q)==SQLITE_ROW ){ |
| 552 | 552 | const char *zName = db_column_text(&q, 0); |
| 553 | 553 | if( g.perm.Hyperlink ){ |
| 554 | - @ <li>%z(xhref("class='taglink'","%R/timeline?t=%T",zName)) | |
| 554 | + @ <li>%z(xhref("class=\"taglink\"","%R/timeline?t=%T",zName)) | |
| 555 | 555 | @ %h(zName)</a></li> |
| 556 | 556 | }else{ |
| 557 | 557 | @ <li><span class="tagDsp">%h(zName)</span></li> |
| 558 | 558 | } |
| 559 | 559 | } |
| 560 | 560 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -549,11 +549,11 @@ | |
| 549 | ); |
| 550 | @ <ul> |
| 551 | while( db_step(&q)==SQLITE_ROW ){ |
| 552 | const char *zName = db_column_text(&q, 0); |
| 553 | if( g.perm.Hyperlink ){ |
| 554 | @ <li>%z(xhref("class='taglink'","%R/timeline?t=%T",zName)) |
| 555 | @ %h(zName)</a></li> |
| 556 | }else{ |
| 557 | @ <li><span class="tagDsp">%h(zName)</span></li> |
| 558 | } |
| 559 | } |
| 560 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -549,11 +549,11 @@ | |
| 549 | ); |
| 550 | @ <ul> |
| 551 | while( db_step(&q)==SQLITE_ROW ){ |
| 552 | const char *zName = db_column_text(&q, 0); |
| 553 | if( g.perm.Hyperlink ){ |
| 554 | @ <li>%z(xhref("class=\"taglink\"","%R/timeline?t=%T",zName)) |
| 555 | @ %h(zName)</a></li> |
| 556 | }else{ |
| 557 | @ <li><span class="tagDsp">%h(zName)</span></li> |
| 558 | } |
| 559 | } |
| 560 |
+4
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -48,11 +48,11 @@ | ||
| 48 | 48 | */ |
| 49 | 49 | void hyperlink_to_uuid(const char *zUuid){ |
| 50 | 50 | char z[UUID_SIZE+1]; |
| 51 | 51 | shorten_uuid(z, zUuid); |
| 52 | 52 | if( g.perm.Hyperlink ){ |
| 53 | - @ %z(xhref("class='timelineHistLink'","%R/info/%s",z))[%s(z)]</a> | |
| 53 | + @ %z(xhref("class=\"timelineHistLink\"","%R/info/%s",z))[%s(z)]</a> | |
| 54 | 54 | }else{ |
| 55 | 55 | @ <span class="timelineHistDsp">[%s(z)]</span> |
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| @@ -431,25 +431,25 @@ | ||
| 431 | 431 | @ <ul class="filelist"> |
| 432 | 432 | inUl = 1; |
| 433 | 433 | } |
| 434 | 434 | if( isNew ){ |
| 435 | 435 | @ <li> %h(zFilename) (new file) |
| 436 | - @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew)) | |
| 436 | + @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew)) | |
| 437 | 437 | @ [view]</a></li> |
| 438 | 438 | }else if( isDel ){ |
| 439 | 439 | @ <li> %h(zFilename) (deleted)</li> |
| 440 | 440 | }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){ |
| 441 | 441 | @ <li> %h(zOldName) → %h(zFilename) |
| 442 | - @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew)) | |
| 442 | + @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew)) | |
| 443 | 443 | @ [view]</a></li> |
| 444 | 444 | }else{ |
| 445 | 445 | if( zOldName!=0 ){ |
| 446 | 446 | @ <li> %h(zOldName) → %h(zFilename) |
| 447 | 447 | }else{ |
| 448 | 448 | @ <li> %h(zFilename) |
| 449 | 449 | } |
| 450 | - @ %z(xhref("target='diffwindow'","%R/fdiff?v1=%S&v2=%S",zOld,zNew)) | |
| 450 | + @ %z(xhref("target=\"diffwindow\"","%R/fdiff?v1=%S&v2=%S",zOld,zNew)) | |
| 451 | 451 | @ [diff]</a></li> |
| 452 | 452 | } |
| 453 | 453 | } |
| 454 | 454 | db_reset(&fchngQuery); |
| 455 | 455 | if( inUl ){ |
| 456 | 456 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -48,11 +48,11 @@ | |
| 48 | */ |
| 49 | void hyperlink_to_uuid(const char *zUuid){ |
| 50 | char z[UUID_SIZE+1]; |
| 51 | shorten_uuid(z, zUuid); |
| 52 | if( g.perm.Hyperlink ){ |
| 53 | @ %z(xhref("class='timelineHistLink'","%R/info/%s",z))[%s(z)]</a> |
| 54 | }else{ |
| 55 | @ <span class="timelineHistDsp">[%s(z)]</span> |
| 56 | } |
| 57 | } |
| 58 | |
| @@ -431,25 +431,25 @@ | |
| 431 | @ <ul class="filelist"> |
| 432 | inUl = 1; |
| 433 | } |
| 434 | if( isNew ){ |
| 435 | @ <li> %h(zFilename) (new file) |
| 436 | @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew)) |
| 437 | @ [view]</a></li> |
| 438 | }else if( isDel ){ |
| 439 | @ <li> %h(zFilename) (deleted)</li> |
| 440 | }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){ |
| 441 | @ <li> %h(zOldName) → %h(zFilename) |
| 442 | @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew)) |
| 443 | @ [view]</a></li> |
| 444 | }else{ |
| 445 | if( zOldName!=0 ){ |
| 446 | @ <li> %h(zOldName) → %h(zFilename) |
| 447 | }else{ |
| 448 | @ <li> %h(zFilename) |
| 449 | } |
| 450 | @ %z(xhref("target='diffwindow'","%R/fdiff?v1=%S&v2=%S",zOld,zNew)) |
| 451 | @ [diff]</a></li> |
| 452 | } |
| 453 | } |
| 454 | db_reset(&fchngQuery); |
| 455 | if( inUl ){ |
| 456 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -48,11 +48,11 @@ | |
| 48 | */ |
| 49 | void hyperlink_to_uuid(const char *zUuid){ |
| 50 | char z[UUID_SIZE+1]; |
| 51 | shorten_uuid(z, zUuid); |
| 52 | if( g.perm.Hyperlink ){ |
| 53 | @ %z(xhref("class=\"timelineHistLink\"","%R/info/%s",z))[%s(z)]</a> |
| 54 | }else{ |
| 55 | @ <span class="timelineHistDsp">[%s(z)]</span> |
| 56 | } |
| 57 | } |
| 58 | |
| @@ -431,25 +431,25 @@ | |
| 431 | @ <ul class="filelist"> |
| 432 | inUl = 1; |
| 433 | } |
| 434 | if( isNew ){ |
| 435 | @ <li> %h(zFilename) (new file) |
| 436 | @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew)) |
| 437 | @ [view]</a></li> |
| 438 | }else if( isDel ){ |
| 439 | @ <li> %h(zFilename) (deleted)</li> |
| 440 | }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){ |
| 441 | @ <li> %h(zOldName) → %h(zFilename) |
| 442 | @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew)) |
| 443 | @ [view]</a></li> |
| 444 | }else{ |
| 445 | if( zOldName!=0 ){ |
| 446 | @ <li> %h(zOldName) → %h(zFilename) |
| 447 | }else{ |
| 448 | @ <li> %h(zFilename) |
| 449 | } |
| 450 | @ %z(xhref("target=\"diffwindow\"","%R/fdiff?v1=%S&v2=%S",zOld,zNew)) |
| 451 | @ [diff]</a></li> |
| 452 | } |
| 453 | } |
| 454 | db_reset(&fchngQuery); |
| 455 | if( inUl ){ |
| 456 |
+3
-3
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -374,11 +374,11 @@ | ||
| 374 | 374 | @ <textarea name="w" class="wikiedit" cols="80" |
| 375 | 375 | @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea> |
| 376 | 376 | @ <br /> |
| 377 | 377 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 378 | 378 | @ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor" |
| 379 | - @ onclick='return confirm("Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?")' /> | |
| 379 | + @ onclick="return confirm('Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?')" /> | |
| 380 | 380 | } |
| 381 | 381 | @ <input type="submit" name="preview" value="Preview Your Changes" /> |
| 382 | 382 | }else{ |
| 383 | 383 | /* Wysiwyg editing */ |
| 384 | 384 | Blob html, temp; |
| @@ -392,17 +392,17 @@ | ||
| 392 | 392 | blob_reset(&temp); |
| 393 | 393 | wysiwygEditor("w", blob_str(&html), 60, n); |
| 394 | 394 | blob_reset(&html); |
| 395 | 395 | @ <br /> |
| 396 | 396 | @ <input type="submit" name="edit-markup" value="Markup Editor" |
| 397 | - @ onclick='return confirm("Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?")' /> | |
| 397 | + @ onclick="return confirm('Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?')" /> | |
| 398 | 398 | } |
| 399 | 399 | @ <input type="submit" name="submit" value="Apply These Changes" /> |
| 400 | 400 | login_insert_csrf_secret(); |
| 401 | 401 | @ <input type="hidden" name="name" value="%h(zPageName)" /> |
| 402 | 402 | @ <input type="submit" name="cancel" value="Cancel" |
| 403 | - @ onclick='confirm("Abandon your changes?")' /> | |
| 403 | + @ onclick="confirm('Abandon your changes?')" /> | |
| 404 | 404 | @ </div></form> |
| 405 | 405 | manifest_destroy(pWiki); |
| 406 | 406 | blob_reset(&wiki); |
| 407 | 407 | style_footer(); |
| 408 | 408 | } |
| 409 | 409 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -374,11 +374,11 @@ | |
| 374 | @ <textarea name="w" class="wikiedit" cols="80" |
| 375 | @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea> |
| 376 | @ <br /> |
| 377 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 378 | @ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor" |
| 379 | @ onclick='return confirm("Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?")' /> |
| 380 | } |
| 381 | @ <input type="submit" name="preview" value="Preview Your Changes" /> |
| 382 | }else{ |
| 383 | /* Wysiwyg editing */ |
| 384 | Blob html, temp; |
| @@ -392,17 +392,17 @@ | |
| 392 | blob_reset(&temp); |
| 393 | wysiwygEditor("w", blob_str(&html), 60, n); |
| 394 | blob_reset(&html); |
| 395 | @ <br /> |
| 396 | @ <input type="submit" name="edit-markup" value="Markup Editor" |
| 397 | @ onclick='return confirm("Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?")' /> |
| 398 | } |
| 399 | @ <input type="submit" name="submit" value="Apply These Changes" /> |
| 400 | login_insert_csrf_secret(); |
| 401 | @ <input type="hidden" name="name" value="%h(zPageName)" /> |
| 402 | @ <input type="submit" name="cancel" value="Cancel" |
| 403 | @ onclick='confirm("Abandon your changes?")' /> |
| 404 | @ </div></form> |
| 405 | manifest_destroy(pWiki); |
| 406 | blob_reset(&wiki); |
| 407 | style_footer(); |
| 408 | } |
| 409 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -374,11 +374,11 @@ | |
| 374 | @ <textarea name="w" class="wikiedit" cols="80" |
| 375 | @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea> |
| 376 | @ <br /> |
| 377 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 378 | @ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor" |
| 379 | @ onclick="return confirm('Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?')" /> |
| 380 | } |
| 381 | @ <input type="submit" name="preview" value="Preview Your Changes" /> |
| 382 | }else{ |
| 383 | /* Wysiwyg editing */ |
| 384 | Blob html, temp; |
| @@ -392,17 +392,17 @@ | |
| 392 | blob_reset(&temp); |
| 393 | wysiwygEditor("w", blob_str(&html), 60, n); |
| 394 | blob_reset(&html); |
| 395 | @ <br /> |
| 396 | @ <input type="submit" name="edit-markup" value="Markup Editor" |
| 397 | @ onclick="return confirm('Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?')" /> |
| 398 | } |
| 399 | @ <input type="submit" name="submit" value="Apply These Changes" /> |
| 400 | login_insert_csrf_secret(); |
| 401 | @ <input type="hidden" name="name" value="%h(zPageName)" /> |
| 402 | @ <input type="submit" name="cancel" value="Cancel" |
| 403 | @ onclick="confirm('Abandon your changes?')" /> |
| 404 | @ </div></form> |
| 405 | manifest_destroy(pWiki); |
| 406 | blob_reset(&wiki); |
| 407 | style_footer(); |
| 408 | } |
| 409 |