Commits

Anonymous committed 28a753c

pretify title

  • Participants
  • Parent commits 3611108

Comments (0)

Files changed (3)

 
 FORBIDDEN_CNAME = ['mail', 'www', 'blog', 'news', 'media', 'upload', 'files', 'store']
 
-re_page = re.compile(r'^[- \w]+$', re.U)
+re_page = re.compile(r"^[\"\'\- \w]+$", re.U)
 re_address = re.compile(r'^[-_\w]+$')
 
 

static/css/src/layout.css

     
 }
 
+
 .rename {
     display: inline;
     width: 200px;

static/js/src/application.js

     submit: function() { 
         var title = $("title");
         //a-zA-Z0-9_\\u00A1-\\uFFFF
-        if (!title.value.match(/^[ \w\u00A1-\uFFFF]+$/i) || FORBIDDEN_PAGES.indexOf(title.value) >= 0) {
+        if (!title.value.match(/^['\-\" \w\u00A1-\uFFFF]+$/i) || FORBIDDEN_PAGES.indexOf(title.value) >= 0) {
             alert("Page title invalid");
             return false;
         }