GNU bug report logs -
#59549
EWW ordered list display irregularity
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi everyone,
> Here is the Wiktionary definition of the word "locus":
> https://en.wiktionary.org/wiki/locus#Noun When I open that page in
> EWW, I see five definition entries. But the second entry is blank.
I was able to reproduce.
> So EWW is not failing to display anything; instead, it is inserting
> something extra. That extra something comes from this piece of HTML:
>
> <li class="mw-empty-elt"></li>
I wouldn't say for sure EWW is in the wrong here. Apparently inserting
empty li elements for styling purposed is a somewhat common practice.
Couldn't confirm how "correct" it is, but it is accepted.
(sidenote, stuff like this makes be glad I haven't worked in web stuff
in many many years)
> I don't know why that's in there or how Firefox knows not to display
> it. It would be cool if EWW also knew not to display it.
The attached patch does exactly that: skip any li elements that don't
have content.
[0001-shr-don-t-render-empty-li-tags-bug-59549.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
I tested with the Wiktionary page and a few other offline tests and it
worked as intended.
Regards,
Seb
--
Sebastián Monía
https://site.sebasmonia.com/
This bug report was last modified 222 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.