3 $ wget http://www.thomas.schwinge.homeip.net/tmp/cutpaste_filter.tar.bz2
4 $ wget http://www.thomas.schwinge.homeip.net/tmp/cutpaste_filter.patch
6 $ tar -xj < cutpaste_filter.tar.bz2
9 $ find "$PWD".rendered/ -type f -print0 | xargs -0 grep -H -E 'FOO|BAR'
10 [notice one FOO in there]
11 $ rm -rf .ikiwiki "$PWD".rendered
13 $ cp /usr/share/perl5/IkiWiki/Plugin/cutpaste.pm .library/IkiWiki/Plugin/
14 $ patch -p0 < ../cutpaste_filter.patch
16 $ find "$PWD".rendered/ -type f -print0 | xargs -0 grep -H -E 'FOO|BAR'
17 [correct; notice no more FOO]
19 I guess this needs a general audit -- there are other places where `preprocess`
20 is being doing without `filter`ing first, for example in the same file, `copy`
25 > So, in English, page text inside a cut directive will not be filtered.
26 > Because the cut directive takes the text during the scan pass, before
29 > Commit 192ce7a238af9021b0fd6dd571f22409af81ebaf and
30 > [[bugs/po_vs_templates]] has to do with this.
31 > There I decided that filter hooks should *only* act on the complete
34 > I also suggested that anything that wants to reliably
35 > s/FOO/BAR/ should probably use a sanitize hook, not a filter hook.
36 > I think that would make sense in this example.
38 > I don't see any way to make cut text be filtered while satisfying these
39 > constraints, without removing cutpaste's ability to have forward pastes
40 > of text cut laster in the page. (That does seems like an increasingly
41 > bad idea..) --[[Joey]]