unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39867: 26.3; EWW does not show textarea content
@ 2020-03-02 15:25 Xu Chunyang
  2020-07-17 14:44 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Xu Chunyang @ 2020-03-02 15:25 UTC (permalink / raw)
  To: 39867

I notice EWW doesn't show the textarea element's contents, for example,
save the following to a.html

    <textarea>HELLO</textarea>

then 'M-x eww-open-file a.html' shows some empty lines without any text.

The following patch fixes the issue for me. And the old code seems
assuming <textarea value='HELLO'></textarea>, which is not correct.

diff -u --label /Users/xcy/src/emacs-mac/lisp/net/eww.el --label
\#\<buffer\ eww.el\> /Users/xcy/src/emacs-mac/lisp/net/eww.el
/var/folders/7f/s191h4q97p90374yw15ssrs00000gn/T/buffer-content-gR2Wn9
--- /Users/xcy/src/emacs-mac/lisp/net/eww.el
+++ #<buffer eww.el>
@@ -1168,7 +1168,7 @@

 (defun eww-tag-textarea (dom)
   (let ((start (point))
- (value (or (dom-attr dom 'value) ""))
+ (value (or (dom-text dom) ""))
  (lines (string-to-number (or (dom-attr dom 'rows) "10")))
  (width (string-to-number (or (dom-attr dom 'cols) "10")))
  end)

Diff finished.  Mon Mar  2 23:21:14 2020





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#39867: 26.3; EWW does not show textarea content
  2020-03-02 15:25 bug#39867: 26.3; EWW does not show textarea content Xu Chunyang
@ 2020-07-17 14:44 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-07-17 14:44 UTC (permalink / raw)
  To: Xu Chunyang; +Cc: 39867

Xu Chunyang <xuchunyang56@gmail.com> writes:

> I notice EWW doesn't show the textarea element's contents, for example,
> save the following to a.html
>
>     <textarea>HELLO</textarea>
>
> then 'M-x eww-open-file a.html' shows some empty lines without any text.
>
> The following patch fixes the issue for me. And the old code seems
> assuming <textarea value='HELLO'></textarea>, which is not correct.

[...]

> - (value (or (dom-attr dom 'value) ""))
> + (value (or (dom-text dom) ""))

Thanks; applied to Emacs 28.1.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-17 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 15:25 bug#39867: 26.3; EWW does not show textarea content Xu Chunyang
2020-07-17 14:44 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).