> after upgrading from MoinMoin 1.5.8 to 1.7.0,
BTW (unrelated to your post) 1.7.1 is out.
> files ending
> with .html (and .xml), attached with {{attachment:file.html}}
> don't appear as source code anymore, but are rendered by the
> browser.
Moin 1.5 didn't have that syntax.
{{...}} means transclude ("render here")
[[...]] means link.
Maybe you are confusing it with {{{ ... }}} (3 vs. 2 curly braces)?
> 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)?
Well, appending .txt might be the only way currently, because it detects
the mimetype from the suffix (and then, also sends that mimetype to the
browser).
Of course you can use a parser section / pre section and paste the stuff
there, but maybe you don't want to handle it that way.
> 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)
> }
That SHOULD work. Did you restart moin after changing configuration?
Your python version?
-------------------------------------------------------------------------
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