Fossil

Check-in [288fe34c]
Login

Check-in [288fe34c]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When setting $webpagename pass the value of g.zPath though escape_quotes(). This is unclear how g.zPath can contain quotes but let this strange case be handled in a safe way.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | base-href-fix
Files: files | file ages | folders
SHA3-256: 288fe34ced9099e0ccc5ce9cc90f091312d2435e6a913b4b037c8e5ae544b176
User & Date: george 2022-02-15 00:58:41
Context
2022-02-15
02:26
Do not override base href for wiki pages. This needs testing. ... (check-in: 89dd3451 user: george tags: base-href-fix)
00:58
When setting $webpagename pass the value of g.zPath though escape_quotes(). This is unclear how g.zPath can contain quotes but let this strange case be handled in a safe way. ... (check-in: 288fe34c user: george tags: base-href-fix)
00:14
Move <meta charset="UTF-8"> to the begining of the default header. Supply BODY element with a class that derives from $webpagename. ... (check-in: 6d135904 user: george tags: base-href-fix)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/style.c.

793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
  Th_Store("secureurl", fossil_wants_https(1)? g.zHttpsURL: g.zBaseURL);
  Th_Store("home", g.zTop);
  Th_Store("index_page", db_get("index-page","/home"));
  if( local_zCurrentPage==0 ) style_set_current_page("%T", g.zPath);
  Th_Store("current_page", local_zCurrentPage);
  if( !local_zBaseHrefSuffix ) style_set_base_href_suffix("%s",g.zRelReqURI);
  Th_Store("base_href_suffix", local_zBaseHrefSuffix);
  Th_Store("webpagename", g.zPath);
  Th_Store("csrf_token", g.zCsrfToken);
  Th_Store("release_version", RELEASE_VERSION);
  Th_Store("manifest_version", MANIFEST_VERSION);
  Th_Store("manifest_date", MANIFEST_DATE);
  Th_Store("compiler_name", COMPILER_NAME);
  Th_Store("mainmenu", style_get_mainmenu());
  stylesheet_url_var();







|







793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
  Th_Store("secureurl", fossil_wants_https(1)? g.zHttpsURL: g.zBaseURL);
  Th_Store("home", g.zTop);
  Th_Store("index_page", db_get("index-page","/home"));
  if( local_zCurrentPage==0 ) style_set_current_page("%T", g.zPath);
  Th_Store("current_page", local_zCurrentPage);
  if( !local_zBaseHrefSuffix ) style_set_base_href_suffix("%s",g.zRelReqURI);
  Th_Store("base_href_suffix", local_zBaseHrefSuffix);
  Th_Store("webpagename", escape_quotes(g.zPath));
  Th_Store("csrf_token", g.zCsrfToken);
  Th_Store("release_version", RELEASE_VERSION);
  Th_Store("manifest_version", MANIFEST_VERSION);
  Th_Store("manifest_date", MANIFEST_DATE);
  Th_Store("compiler_name", COMPILER_NAME);
  Th_Store("mainmenu", style_get_mainmenu());
  stylesheet_url_var();