Description
If you enter a link to an attachment like
attachment:gro%DF.txt
an error is raised: 'utf8' codec can't decode bytes in position...
This(?) error is also observed in another scenario:
Add file://gro%DF.txt to a page. (or try with this page)
- Click preview (text mode)
- Switch to GUI mode
- Switch to text mode
Steps to reproduce
see description
Details
This Wiki. - The bug seems to be more critical as it is possible to make pages practically non-accessible (like I did here for WikiSandBox by accident). The bug was originally observed in moin-1.5.4.
Workaround
Edit the page manually and replace the % by %25.
Discussion
wikiutil.py in url_unquote only tries to decode from config.charset (utf-8) and it doesn't catch or work around decoding errors (could use decodeUnknownInput to work at least for utf-8 and iso-8859-1 and config.charset (and not crash in any case).
TODO: find out why the gui converter(?) tries to unquote at all.
Plan
- Priority:
- Assigned to:
Status: while the gui editor bug may still be present, moin 1.6 has new link syntax, e.g. [[attachment:groß und übel.txt]] - so no need any more to use %XX.