[links-list] Re: probable bug in elinks: wrong < and > interpretation

Peter Wang tjaden at alphalink.com.au
Fri Jan 4 18:23:10 PST 2002


On 2002-01-04, Petr Baudis <pasky at pasky.ji.cz> wrote:
> Dear diary, on Fri, Jan 04, 2002 at 05:49:24PM CET, I got a letter, where
> Khimenko Victor <khim at sch57.msk.ru> told me, that...
> >
> > Perhaps something like HTML Tidy call should go in default hooks.lua then?
> > I'm not sure if such thing can be done from lua just now... Then
> > interpretation of every broken-yet-visible-in-MS-IE-page will be HTML Tidy
> > problem and not links problem ...
>
> This should be possible. In fact I do this partially now in my
> hooks.lua (see "fix unclosed input/a tags" in hooks.lua). It would be
> nice if someone would do this more properly.

Put something like this in `pre_format_html_hook' in `hooks.lua'.
I didn't test it much.


function pre_format_html_hook (url, html)
	.
	.    
    -- put all .htm* pages through HTML Tidy
    elseif sstrfind (url, ".htm") then
        return pipe_read ("cat << UGLY_HACK_EOF | tidy 2>/dev/null\n"..html..
                          "\nUGLY_HACK_EOF")
    end
	.
	.
-- 
Unsubscribe: send email to links-list-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the links-list mailing list