Fossil SCM

Only add the default <body> element to the header if the configured header lacks "<body". Formerly, it searched for "<body>" and that search would fail if the body element contained attributes. ToDo: This default body-element mechanism needs to be better documented.

drh 2018-07-03 10:23 trunk
Commit 24ecb3bbd566e8b44aaa3c8544182a756bf55d224792585d481f2cd5712a2d4e
2 files changed +1 -1 +1 -1
+1 -1
--- src/style.c
+++ src/style.c
@@ -422,11 +422,11 @@
422422
image_url_var("logo");
423423
image_url_var("background");
424424
if( !login_is_nobody() ){
425425
Th_Store("login", g.zLogin);
426426
}
427
- if( sqlite3_strlike("%<body>%", zHeader, 0)!=0 ){
427
+ if( sqlite3_strlike("%<body%", zHeader, 0)!=0 ){
428428
Th_Render(zDfltHeader);
429429
}
430430
if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
431431
Th_Render(zHeader);
432432
if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
433433
--- src/style.c
+++ src/style.c
@@ -422,11 +422,11 @@
422 image_url_var("logo");
423 image_url_var("background");
424 if( !login_is_nobody() ){
425 Th_Store("login", g.zLogin);
426 }
427 if( sqlite3_strlike("%<body>%", zHeader, 0)!=0 ){
428 Th_Render(zDfltHeader);
429 }
430 if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
431 Th_Render(zHeader);
432 if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
433
--- src/style.c
+++ src/style.c
@@ -422,11 +422,11 @@
422 image_url_var("logo");
423 image_url_var("background");
424 if( !login_is_nobody() ){
425 Th_Store("login", g.zLogin);
426 }
427 if( sqlite3_strlike("%<body%", zHeader, 0)!=0 ){
428 Th_Render(zDfltHeader);
429 }
430 if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
431 Th_Render(zHeader);
432 if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
433
--- www/customskin.md
+++ www/customskin.md
@@ -91,11 +91,11 @@
9191
the skin of the repository from which it was cloned.
9292
9393
Header And Footer Processing
9494
----------------------------
9595
96
-The header.txt and footer.txt files of a scan are merely the HTML text
96
+The header.txt and footer.txt files of a skin are merely the HTML text
9797
of the header and footer. Except, before being prepended and appended to
9898
the content, the header and footer text are run through a
9999
[TH1 interpreter](./th1.md) that might adjust the text as follows:
100100
101101
* All text within &lt;th1&gt;...&lt;/th1&gt; is elided from the
102102
--- www/customskin.md
+++ www/customskin.md
@@ -91,11 +91,11 @@
91 the skin of the repository from which it was cloned.
92
93 Header And Footer Processing
94 ----------------------------
95
96 The header.txt and footer.txt files of a scan are merely the HTML text
97 of the header and footer. Except, before being prepended and appended to
98 the content, the header and footer text are run through a
99 [TH1 interpreter](./th1.md) that might adjust the text as follows:
100
101 * All text within &lt;th1&gt;...&lt;/th1&gt; is elided from the
102
--- www/customskin.md
+++ www/customskin.md
@@ -91,11 +91,11 @@
91 the skin of the repository from which it was cloned.
92
93 Header And Footer Processing
94 ----------------------------
95
96 The header.txt and footer.txt files of a skin are merely the HTML text
97 of the header and footer. Except, before being prepended and appended to
98 the content, the header and footer text are run through a
99 [TH1 interpreter](./th1.md) that might adjust the text as follows:
100
101 * All text within &lt;th1&gt;...&lt;/th1&gt; is elided from the
102

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button