Hello,
after upgrading from MoinMoin 1.5.8 to 1.7.0, files ending
with .html (and .xml), attached with {{attachment:file.html}}
don't appear as source code anymore, but are rendered by the
browser.
Is there a way to turn off this behavior and revert back to
the old way of displaying the content of those files as
plain boring text/plain inline attachment (short of renaming
them by appending a .txt as in file.html.txt which I'd prefer
to avoid)?
I've tried to add the following to the file
$PYTHON_PATH/site-packages/MoinMoin/wikiutil.py
but while it works for the additional extensions
like '.dat', '.cxx' etc. it doesn't work for '.html'
nor '.xml':
MIMETYPES_MORE = {
# ...
'.dat': 'text/plain',
'.cxx': 'text/x-c++src',
'.i': 'text/x-c++src',
'.schema': 'text/plain',
'.rpy': 'text/x-python',
'.wsgi': 'text/x-python',
'.php': 'text/plain', # see MIMETYPES_sanitize_mapping
'.html': 'text/plain', # don't render as HTML! (won't work)
'.xml': 'text/plain', # don't render as HTML! (won't work)
}
MIMETYPES_sanitize_mapping = {
# ...
('application', 'x-httpd-php'): ('text', 'plain'),
('text', 'html'): ('text', 'plain'), # (won't work)
}
Thanks,
-cpghost.
--
Cordula's Web. http://www.cordula.ws/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Moin-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/moin-user