diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs
--- a/Yesod/Form/Fields.hs
+++ b/Yesod/Form/Fields.hs
@@ -6,6 +6,7 @@
     ( -- * Fields
       -- ** Required
       stringField
+    , passwordField
     , textareaField
     , hiddenField
     , intField
@@ -20,6 +21,7 @@
     , fileField
       -- ** Optional
     , maybeStringField
+    , maybePasswordField
     , maybeTextareaField
     , maybeHiddenField
     , maybeIntField
@@ -64,6 +66,14 @@
 maybeStringField :: (IsForm f, FormType f ~ Maybe String)
                  => FormFieldSettings -> Maybe (Maybe String) -> f
 maybeStringField = optionalFieldHelper stringFieldProfile
+
+passwordField :: (IsForm f, FormType f ~ String)
+              => FormFieldSettings -> Maybe String -> f
+passwordField = requiredFieldHelper passwordFieldProfile
+
+maybePasswordField :: (IsForm f, FormType f ~ Maybe String)
+                   => FormFieldSettings -> Maybe (Maybe String) -> f
+maybePasswordField = optionalFieldHelper passwordFieldProfile
 
 intInput :: Integral i => String -> FormInput sub master i
 intInput n =
diff --git a/Yesod/Form/Profiles.hs b/Yesod/Form/Profiles.hs
--- a/Yesod/Form/Profiles.hs
+++ b/Yesod/Form/Profiles.hs
@@ -4,6 +4,7 @@
 {-# LANGUAGE CPP #-}
 module Yesod.Form.Profiles
     ( stringFieldProfile
+    , passwordFieldProfile
     , textareaFieldProfile
     , hiddenFieldProfile
     , intFieldProfile
@@ -163,6 +164,20 @@
         [$hamlet|
 #endif
 %input#$theId$!name=$name$!type=text!:isReq:required!value=$val$
+|]
+    }
+
+passwordFieldProfile :: FieldProfile s m String
+passwordFieldProfile = FieldProfile
+    { fpParse = Right
+    , fpRender = id
+    , fpWidget = \theId name val isReq -> addHamlet
+#if GHC7
+        [hamlet|
+#else
+        [$hamlet|
+#endif
+%input#$theId$!name=$name$!type=password!:isReq:required!value=$val$
 |]
     }
 
diff --git a/Yesod/Helpers/Static.hs b/Yesod/Helpers/Static.hs
--- a/Yesod/Helpers/Static.hs
+++ b/Yesod/Helpers/Static.hs
@@ -153,9 +153,11 @@
     fs <- qRunIO $ getFileList fp
     concat `fmap` mapM go fs
   where
-    replace' '.' = '_'
-    replace' '-' = '_'
-    replace' c = c
+    replace' c
+        | 'A' <= c && c <= 'Z' = c
+        | 'a' <= c && c <= 'z' = c
+        | '0' <= c && c <= '9' = c
+        | otherwise = '_'
     go f = do
         let name = mkName $ intercalate "_" $ map (map replace') f
         f' <- lift f
diff --git a/yesod.cabal b/yesod.cabal
--- a/yesod.cabal
+++ b/yesod.cabal
@@ -1,5 +1,5 @@
 name:            yesod
-version:         0.6.3
+version:         0.6.4
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
