Item13554: Foswiki doesn't work with accented Template names
Priority: Normal
Current State: Closed
Released In: 2.1.0
Target Release: minor
How to repo
--
JozefMojzis - 23 Jul 2015
Just checking ... you are testing the non-default
AutoTemplatePlugin, and not the default
AutoViewTemplatePlugin.
--
GeorgeClark - 23 Jul 2015
The issue might be in the core Template code. Debug from
AutoViewTemplatePlugin:
| 2015-07-23T19:59:23-04:00 debug | - AutoViewTemplatePlugin: formfields detected (TéstForm) |
| 2015-07-23T19:59:23-04:00 debug | - AutoViewTemplatePlugin: called _getTemplateFromTemplateExistence(TéstForm, TestautoForm, Litterbox) |
| 2015-07-23T19:59:23-04:00 debug | - AutoViewTemplatePlugin: VIEW_TEMPLATE set to: Litterbox.TéstView |
And even if I manually set the view template, it still isn't picked up.
--
GeorgeClark - 24 Jul 2015
Working as designed:
# SMELL: not i18n-friendly (can't have accented characters in template name)
# zap anything suspicious
$name =~ s/[^A-Za-z0-9_,.\/]//g;
--
GeorgeClark - 24 Jul 2015
The fix is straight forward, but needs a security review. Original filtering was added in
http://develop.twiki.org/~twiki/cgi-bin/view/Bugs/Item5324
--
GeorgeClark - 24 Jul 2015
Ah yes - mea culpa - mean the default
AutoViewTemplatePlugin.
--
JozefMojzis - 24 Jul 2015
Unit tests all pass with this patch applied.
--
GeorgeClark - 24 Jul 2015
Due to the risk of allowing utf-8 template names, this will be documented as a known limitation for now. Fix with unit test is attached.
--
GeorgeClark - 24 Jul 2015