anchor.diff:      end,
   
       NewAttachments = [
  -        {list_to_binary(Name), {list_to_binary(ContentType), Content}} ||
  +        {validate_attachment_name(Name), {list_to_binary(ContentType), Content}} ||
           {Name, {ContentType, _}, Content} <-
           proplists:get_all_values("_attachments", Form)
       ],
  
positive.code:         [Rev0|_] -> Rev0;
          [] -> undefined
      end,
      case couch_httpd:header_value(Req, "X-Couch-Full-Commit", "false") of
      "true" ->
          Options = [full_commit];
  
negative.code: 
  db_attachment_req(#httpd{method=Method}=Req, Db, DocId, FileNameParts)
          when (Method == 'PUT') or (Method == 'DELETE') ->
      FileName = validate_attachment_name(
                      mochiweb_util:join(
                          lists:map(fun binary_to_list/1, 
                              FileNameParts),"/")),
      
      NewAttachment = case Method of
          'DELETE' ->
              [];
  