[Top][All Lists]

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

Re: Does shr support HTML directional attributes?

From: Lars Magne Ingebrigtsen
Subject: Re: Does shr support HTML directional attributes?
Date: Tue, 05 May 2015 02:59:43 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> I've just got a (spam) mail in Arabic whose portions were displayed
> left-aligned, which is not what the HTML payload wanted (it used
> dir=RTL and style='margin-right:.5in;text-align:right...'), which
> AFAIU should have caused the text rendered as right-to-left paragraph.
> Does shr support these attributes?

Nope; shr doesn't support the "dir" attribute in elements.  I think
there used to be support for the text-align style attribute in <td>
cells, but looking at shr.el now, that seems to have been lost during
the variable-width font rewrite.

shr is a pretty minimal HTML renderer -- it tries to be fast enough for
most web pages, but it doesn't try very hard to be an accurate HTML
renderer.  There's tons of stuff it doesn't support, because it'd be too
slow.  If you find a way to support those two elements without affecting
the general rendering speed, please go ahead and add support for them.

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]