Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tighter permalink auto-typing

  • Loading branch information...
commit f190df1356dad564d4c9e24b0bec560c1fac8679 1 parent 2142430
@joemsak joemsak authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/views/admin/blogs/_form.html.erb
View
2  app/views/admin/blogs/_form.html.erb
@@ -96,7 +96,7 @@
});
$('#blog_title').keyup(function(){
- slug = $(this).val().replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase();
+ slug = $(this).val().replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').replace(/-{2,}/,'-').toLowerCase();
$('#blog_permalink').val(slug);
})
});
Please sign in to comment.
Something went wrong with that request. Please try again.