[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

textarea without name



青田です。

w3m-fontify-textareasがname属性があることを前提にstring-matchしているため、
name属性のないtextareaを正常にfontifyできていないようです。
また、w3m-form-resumeにも同様の問題があったため修正してあります。

w3m-form-field-parseもname属性があることを前提にstring-matchしていて
nameのないラジオボタンは複数選択可能になっているので、w3mの動作にあわせ
一応修正してありますがどう処理すべきなのでしょうか?


Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3003
diff -u -r1.3003 ChangeLog
--- ChangeLog	28 Apr 2007 13:05:08 -0000	1.3003
+++ ChangeLog	30 Apr 2007 07:33:20 -0000
@@ -1,3 +1,10 @@
+2007-04-30  Naohiro Aota  <nao.aota@xxxxxxxxx>
+
+	* w3m-form.el (w3m-form-resume): Also resume contents of forms without
+	name.
+	(w3m-fontify-textareas): Also fontify textareas without name.
+	(w3m-form-field-parse): Also parse form fields without name.
+
 2007-04-28  Naohiro Aota  <nao.aota@xxxxxxxxx>
 
 	* w3m.el (w3m-decode-buffer): Use w3m-url-transfer-encode-string
Index: w3m-form.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-form.el,v
retrieving revision 1.158
diff -u -r1.158 w3m-form.el
--- w3m-form.el	19 Apr 2007 07:08:20 -0000	1.158
+++ w3m-form.el	30 Apr 2007 07:33:26 -0000
@@ -347,7 +347,7 @@
 	  (let ((fid (get-text-property (point) 'w3m-form-field-id)))
 	    (when (and fid
 		       (string-match "\
-fid=\\([^/]+\\)/type=\\([^/]+\\)/name=\\([^/]+\\)/id=\\(.*\\)$"
+fid=\\([^/]+\\)/type=\\([^/]+\\)/name=\\([^/]*\\)/id=\\(.*\\)$"
 				     fid))
 	      (let ((form (nth (string-to-number (match-string 1 fid))
 			       forms))
@@ -527,7 +527,7 @@
 	      (and
 	       fid
 	       (string-match
-		"fid=\\([^/]+\\)/type=\\([^/]+\\)/name=\\([^/]+\\)/id=\\(.*\\)$"
+		"fid=\\([^/]+\\)/type=\\([^/]+\\)/name=\\([^/]*\\)/id=\\(.*\\)$"
 		fid))
 	    (setq form (nth (string-to-number (match-string 1 fid))
 			    w3m-current-forms)
@@ -952,7 +952,7 @@
 (defsubst w3m-form-field-parse (fid)
   (when (and fid
 	     (string-match
-	      "fid=\\([^/]+\\)/type=\\([^/]+\\)/name=\\([^/]+\\)/id=\\(.*\\)$"
+	      "fid=\\([^/]+\\)/type=\\([^/]+\\)/name=\\([^/]*\\)/id=\\(.*\\)$"
 	      fid))
     (list (match-string 1 fid)
 	  (match-string 2 fid)