jchris / sofa

Standalone CouchDB Blog, used by the O'Reilly CouchDB book
http://books.couchdb.org
371 stars 61 forks source link

Can't create new post with non-English title. #15

Open hummermania opened 13 years ago

hummermania commented 13 years ago

Can't create new post with non-English title because in the lib/blog.js the regexp /\W/g - replace all char wich is not in Latin. I suggest to replace this expr. to :

var str = string.replace(/[\p{L}]/g,'-'). ...

Get it from http://www.regular-expressions.info/unicode.html and tested - good work. But this can create doc with the id in non-English letter in the db. =)

Sorry of my english. Markevich Alexander.