[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EWW/SHR Feature Request
From: |
Nicolas Richard |
Subject: |
Re: EWW/SHR Feature Request |
Date: |
Fri, 21 Mar 2014 17:48:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
"T. V. Raman" <address@hidden> writes:
> Now that we have shr and eww, it would be nice to have a function
> that takes an html string and returns a formatted representation
> (replete with properties etc.) something like
> (shr-format-html-string html-string) -> Return: Formatted string
> suitable for insertion into a buffer.
Is it something like this ?
(let ((html-string "<a href=\"http://www.gnu.org\">GNU website</a>"))
(with-temp-buffer
(insert html-string)
(shr-render-region (point-min) (point-max))
(buffer-string)))
(the html-string should in fact be a complete html doc, but libxml does
its best to turn bad html like the above into *something*.)
--
Nico.