The bad news: Safari 5 broke that. You have to hack the Safari binary instead of the Webkit library, and that breaks code signing.
Many web sites prevent your browser from saving your password for you by putting "autocomplete=no" in their login forms. For years, I've been "fixing" Safari to ignore this by sedding the binary of the Webkit library so that it no longer recognises the word "autocomplete", causing forms to work properly and obey my password-saving preferences.
Current Music: Amanda Blank -- Make-Up ♬