creationix / wheat

Wheat is a blog engine for coders written in node.JS
Other
1.36k stars 134 forks source link

UTF-8 file name #49

Open ghost opened 11 years ago

ghost commented 11 years ago

Is it possible to make wheat route correctly when storing articles in files with utf-8 chars? Rendering of the index pages works, but routing (I guess at wheat/wheat.js) will fail with "404" not-found...

ghost commented 11 years ago

It works with this patched router (wheat.js):

addRoute(/^\/()([\u0590-\u05FFa-z0-9_-]+)$/, Renderers.article); // include hebrew chars ... var match = decodeURIComponent(url.pathname).match(route.regex);