From 8a5354d3b03b31afb23ab4faadcfa27bba423eaa Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Wed, 11 Nov 2020 17:26:47 -0500 Subject: [PATCH] add rhtml plugin, see http://moinmo.in/ParserMarket/RawHTML --- Dockerfile | 3 +++ rhtml/rhtml.py | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 rhtml/rhtml.py diff --git a/Dockerfile b/Dockerfile index c1bfc48..cd41b05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,9 @@ COPY build/moin-1.9.11/setup.py /var/moin/install COPY build/moin-1.9.11/wiki /var/moin/wiki COPY moinmoin/* /var/moin/wiki/ +# rhtml plugin +#COPY rhtml/rhtml.py /var/moin/wiki/data/plugin/parser/rhtml.py + RUN find /var/moin -type d -exec chmod 775 {} \; \ && find /var/moin -type f -exec chmod 664 {} \; \ && chown www-data:www-data /var/moin -R diff --git a/rhtml/rhtml.py b/rhtml/rhtml.py new file mode 100644 index 0000000..2174cd8 --- /dev/null +++ b/rhtml/rhtml.py @@ -0,0 +1,24 @@ +# -*- coding: iso-8859-1 -*- +""" + MoinMoin - Raw HTML Parser + + @copyright: 2010 by Chris Martino + @license: GNU GPL. +""" + +from MoinMoin.parser._ParserBase import ParserBase + +Dependencies = ['user'] + +class Parser(ParserBase): + + parsername = "RawHTML" + Dependencies = [] + + def __init__(self, raw, request, **kw): + self.raw = raw + self.request = request + + def format(self, formatter): + self.request.write(formatter.rawHTML(self.raw)) + -- 2.45.2