From c1b94f71108b4f3b22882f08f9c43b2cc9ebbc81 Mon Sep 17 00:00:00 2001 From: bremner Date: Tue, 22 Jul 2008 22:02:11 -0400 Subject: [PATCH 1/8] --- doc/todo/mbox.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/todo/mbox.mdwn b/doc/todo/mbox.mdwn index bae9ea3e8..2df7ed877 100644 --- a/doc/todo/mbox.mdwn +++ b/doc/todo/mbox.mdwn @@ -3,4 +3,10 @@ I'd like to be able to drop an unmodified RFC2822 email message into ikiwiki, an > We're discussing doing just that (well, whole mailboxes, really) over in > [[comment_by_mail]] --[[Joey]] ->> I am going to start putting something simple together. [[DavidBremner]] +>> I am going to start putting something simple together, but +>> probably not too quickly. +>> So far I don't see a way to have ikiwiki process directories +>> (i.e. maildirs or mh folders) as a single page. This not that +>> big of a deal, but it means that every mailbox will need +>> something like \[[!mailbox type=maildir path=thedir]] in some +>> "normal" (e.g. markdown) page -- [[DavidBremner]] From 8ca397c2c61221558eb31e20c769929f74729883 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Tue, 22 Jul 2008 22:48:19 -0400 Subject: [PATCH 2/8] Report bug in map wrt bare directories --- ...s_inconsistent_about_bare_directories.mdwn | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/bugs/map_is_inconsistent_about_bare_directories.mdwn diff --git a/doc/bugs/map_is_inconsistent_about_bare_directories.mdwn b/doc/bugs/map_is_inconsistent_about_bare_directories.mdwn new file mode 100644 index 000000000..479db3e0f --- /dev/null +++ b/doc/bugs/map_is_inconsistent_about_bare_directories.mdwn @@ -0,0 +1,26 @@ +The [[plugins/map]] plugin has inconsistent behaviour. In particular, I have in my wiki some directory structures holding files without wikitext pointers (I point directly to the files from elsewhere). For example, imagine the following file structure in the source dir: + +* Assignments.mdwn +* Assignments + * 2004 + * Assign1.pdf + * Assign2.pdf + * 2005 + * Assign1.pdf + * Assign2.pdf + * 2006 + * etc., etc. + +When I use map to make a map of this, the result looks more like this: + +* Assignments # this is a link to the correct page + * 2004 # this has a create link + * Assign1.pdf + * Assign2.pdf + * Assign1.pdf + * Assign2.pdf + * etc., etc. + +Note that while the 2004 directory exists with a create link, the 2005 and 2006 (etc) directories are missing from the site map. + +I could imagine including all 'bare' directories in the map, and I could imagine including no 'bare' directories in the map. Just including the first bare directory seems a strange intermediate point. From f213303f4351ffbe560d0237e2a88acbc9d9ed1e Mon Sep 17 00:00:00 2001 From: "http://ptecza.myopenid.com/" Date: Wed, 23 Jul 2008 06:11:18 -0400 Subject: [PATCH 3/8] * Bug? --- ...attachment:_escaping_underscores_in_filename__63__.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn new file mode 100644 index 000000000..f7e1c80f0 --- /dev/null +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -0,0 +1,7 @@ +I've just noticed that `attachment` plugin esacapes underscore characters +in attached filenames. For example, when I wanted to add +`foo_bar_baz.txt` file, then Ikiwiki added file `foo__95__bar__95__baz.txt` +to my Subversion repo. I hope that the filename is terribly ugly not only +for me ;) + +Is it a bug or security feature? --[[Paweł|ptecza]] From 5467015fbdfb98ee406e870a5329c5728a9389a4 Mon Sep 17 00:00:00 2001 From: "http://ptecza.myopenid.com/" Date: Wed, 23 Jul 2008 06:12:12 -0400 Subject: [PATCH 4/8] * Typo --- .../attachment:_escaping_underscores_in_filename__63__.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn index f7e1c80f0..69c9e31fd 100644 --- a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -1,5 +1,5 @@ -I've just noticed that `attachment` plugin esacapes underscore characters -in attached filenames. For example, when I wanted to add +I've just noticed that `attachment` plugin escapes the underscore +characters in attached filenames. For example, when I wanted to add `foo_bar_baz.txt` file, then Ikiwiki added file `foo__95__bar__95__baz.txt` to my Subversion repo. I hope that the filename is terribly ugly not only for me ;) From 107bcb28d333afd77a12872d0b600a669afa2315 Mon Sep 17 00:00:00 2001 From: rdennis Date: Wed, 23 Jul 2008 06:49:18 -0400 Subject: [PATCH 5/8] fixed description for open parameter --- doc/plugins/toggle.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/plugins/toggle.mdwn b/doc/plugins/toggle.mdwn index 5e0b8392a..5eac6e4a1 100644 --- a/doc/plugins/toggle.mdwn +++ b/doc/plugins/toggle.mdwn @@ -30,4 +30,4 @@ mutiple toggles that all toggle a single togglable. The id has a default value of "default", so can be omitted in simple cases. If you'd like a toggleable to be displayed by default, and toggle to -hidden, then pass a parameter "open=true" when setting up the toggleable. +hidden, then pass a parameter "open=yes" when setting up the toggleable. From 89ca6143eee50fc75499eaacf9022d65cfe0adc7 Mon Sep 17 00:00:00 2001 From: "http://ptecza.myopenid.com/" Date: Wed, 23 Jul 2008 07:19:24 -0400 Subject: [PATCH 6/8] * Update --- ...chment:_escaping_underscores_in_filename__63__.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn index 69c9e31fd..509edd3fa 100644 --- a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -5,3 +5,13 @@ to my Subversion repo. I hope that the filename is terribly ugly not only for me ;) Is it a bug or security feature? --[[Paweł|ptecza]] + +>> Update: It's not only problem with attached filenames. I have +>> `mysql/myisam_vs_ndb.mdwn` page in my wiki and attached two +>> images (`myisam_vs_ndb_sql.png` and `myisam_vs_ndb_cpu.png`) +>> and one OpenDocument file (`myisam_vs_ndb.ods`). Ikiwiki placed +>> them into `myisam__95__vs__95__ndb` subdirectory as +>> `myisam__95__vs__95__ndb__95__sql.png`, `myisam__95__vs__95__ndb__95__cpu.png` +>> and `myisam__95__vs__95__ndb.ods` files. When I click "Attachments" link, +>> I can't see my uploaded files, because there are in another subdirectory +>> (`myisam__95__vs__95__ndb` instead of `myisam_vs_ndb`). --[[Paweł|ptecza]] From eca900e65934d89ba48c9055eb05482ac0d590fd Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Wed, 23 Jul 2008 09:04:28 -0400 Subject: [PATCH 7/8] corrected link to the wikiannounce program --- doc/tips/wikiannounce.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tips/wikiannounce.mdwn b/doc/tips/wikiannounce.mdwn index 0d1973546..6eb142cdf 100644 --- a/doc/tips/wikiannounce.mdwn +++ b/doc/tips/wikiannounce.mdwn @@ -2,7 +2,7 @@ One thing I use ikiwiki for is the web pages for software projects I maintain. Each of my projects has a news page with an announcements feed, and to automatically update this when I release a new version, generating an announcement from the debian/changelog and debian/NEWS files, I use a -[wikiannounce](http://git.kitenet.net/?p=joey/home;a=blob_plain;f=bin/wikiannounce) +[wikiannounce](http://git.kitenet.net/?p=joey/home.git;a=blob_plain;f=bin/wikiannounce) program. It's somewhat specific to dealing with Debian packages, and uses a special `announcedir` target in debian/rules, but the general idea could be useful. --[[Joey]] From 1d1767192c80548755655cfe1ce8e503b392c7c1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Jul 2008 14:58:39 -0400 Subject: [PATCH 8/8] attachment: Do not escape _ when determining attachment filenames. --- IkiWiki/Plugin/attachment.pm | 2 +- debian/changelog | 1 + .../attachment:_escaping_underscores_in_filename__63__.mdwn | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 01d0d2478..3982c4883 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -102,7 +102,7 @@ sub formbuilder (@) { #{{{ } } - $filename=IkiWiki::titlepage( + $filename=IkiWiki::linkpage( IkiWiki::possibly_foolish_untaint( attachment_location($form->field('page')). IkiWiki::basename($filename))); diff --git a/debian/changelog b/debian/changelog index 7ab18a2c7..c699f698b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ ikiwiki (2.55) UNRELEASED; urgency=low * Add allow_symlinks_before_srcdir config setting that can be used to avoid a security check that is a good safe default, but problimatic overkill in some situations. + * attachment: Do not escape _ when determining attachment filenames. -- Joey Hess Mon, 21 Jul 2008 11:35:46 -0400 diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn index 509edd3fa..d7d101700 100644 --- a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -15,3 +15,5 @@ Is it a bug or security feature? --[[Paweł|ptecza]] >> and `myisam__95__vs__95__ndb.ods` files. When I click "Attachments" link, >> I can't see my uploaded files, because there are in another subdirectory >> (`myisam__95__vs__95__ndb` instead of `myisam_vs_ndb`). --[[Paweł|ptecza]] + +> [[done]], uses `linkpage` now.