1 rst.pm disallows raw HTML input. (It's meant as a security feature.)
2 IkiWiki generates HTML in rst files pretty much all the time. As
3 such, we should enable raw HTML support. --Ethan
5 > [[done]], although I did add a news item about it, since it could break
6 > the security of certian setups that don't use the htmlscrubber. --[[Joey]]
9 Index: IkiWiki/Plugin/rst.pm
10 ===================================================================
11 --- IkiWiki/Plugin/rst.pm (revision 3926)
12 +++ IkiWiki/Plugin/rst.pm (working copy)
14 html = publish_string(stdin.read(), writer_name='html',
15 settings_overrides = { 'halt_level': 6,
16 'file_insertion_enabled': 0,
20 print html[html.find('<body>')+6:html.find('</body>')].strip();
26 Does the Perl version of this plugin still exist? There appears to be no "rst.pm" in the current distribution; all there is is the python version. --Peter
28 > No, only the python version exists. It does have `raw_enabled` set.
31 I am sorry, but I am confused. Does this mean that I can use Ikiwiki
32 features that translate to HTML in rst files? For example, when I use a
33 \[[pagename]]-style link in a rst file, the page generated by Ikiwiki's rst
34 plugin says <a href="./../pagename/">pagename</a> as text. The link
35 is expanded correctly, but the result isn't interpreted as HTML. Is that
36 what is supposed to happen? --Peter
38 > `raw_enabled` allows you to use the
39 > [raw directive](http://docutils.sourceforge.net/docs/ref/rst/directives.html),
40 > but this is not used by ikiwiki for wikilinks or anything else.
41 > That's why the [[plugin_page|plugins/rst]] has its note about
42 > issues with wikilinks and directives. You'd have to put those inside
43 > raw directives yourself to avoid rst escaping their result. --[[Joey]]
45 You can also create a raw "role" which is at least easier than raw directives.
47 .. role:: ikiwiki(raw)
50 :ikiwiki:`\[[WikiLink]]`
52 A role assigns meaning to interpreted text (for example :acronym:`ABC`) or :PEP:`8`. --ulrik [kaizer.se]