Bug 67070 - [Patch] WebMagick generates nonstandard html
Summary: [Patch] WebMagick generates nonstandard html
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Andrey A. Chernov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-23 12:10 UTC by Vladimir Tchoukharev
Modified: 2004-05-27 01:04 UTC (History)
0 users

See Also:


Attachments
patch-ad (20.42 KB, text/plain)
2004-05-23 12:10 UTC, Vladimir Tchoukharev
no flags Details
file.diff (516 bytes, patch)
2004-05-23 12:10 UTC, Vladimir Tchoukharev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Tchoukharev 2004-05-23 12:10:27 UTC
	WebMagick script generates html pages, which are not valid html. They lack
DOCTYPE declaration, include non-standard elements, some of the tags are in
wrong elements etc.

The proposed patch (which can be just placed in files directory of the port) makes
the generated html-files be valid html 4.01.

Changes in brief.
 - add DOCTYPE declaration at the beginning of each generated html-file
 - change default charset to iso-8859-1 (from default not use charset at all)
 - do not use non-standard <NOBR> element
 - change case of case sensitive tags (border, frameborder)
 - move tags border, frameborder from <FRAMESET> to <FRAME>
 - delete nonstandard FRAMESPACING tag
 - add ALT tags where missed
 - add TYPE tag to <SCRYPT> elements
 - avoid empty <HEAD> element by use of <META> and <TITLE> in it
 - change <HR> to <BR> in one place; I did not check why the validator dislikes <HR> here

Please note that FRAMESPACING tag is introduced by files/patch-aa
Please also note complains from
    portlint -AC /usr/ports/www/WebMagick

How-To-Repeat: 	Feed an URL of a WebMagick-generated page to http://validator.w3.org/ e.g.
http://validator.w3.org/check?uri=http://webmagick.sourceforge.net/samples/one/
(this is a sample from WebMagick homepage).
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2004-05-23 20:13:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ache

Over to maintainer.
Comment 2 Andrey A. Chernov freebsd_committer freebsd_triage 2004-05-24 11:19:30 UTC
State Changed
From-To: open->feedback

> WebMagick script generates html pages, which are not valid html. 

The  main  goal  here  is to produce most compatible html, i.e. rendered 
identically by most of browsers, and not pure standard compliance. I not 
see how your fixes can help identical rendering, but I see that it broke 
it  in several places. Some changes are pure nosense, like changing tags 
case, some does nothing to rendering. If you'll find browser that render 
generated  pages in wrong way and will find a fix for it which not broke 
other  browsers  in  the  same time (at least Mozilla, IE, old Netscape, 
Opera should be tested), you are welcome.
Comment 3 Vladimir Tchoukharev 2004-05-26 20:55:14 UTC
Since my reply to the maintainer did not make its way to gnats,
I repeat it with some clarifications.

Bottom line: Close the PR.

Briefly: We have different goals, therefore different opinions and
demands to tools. Without standard complience as a goal the patch
is not needed.

Broader. I never consider identical rendering on different platforms
as a goal for html (generated or handwritten). For this purpose I
use jpeg, png and similar formats. Even pdf is a compromise from
identical rendering to other conviniences of use. For html I see
logical structure of rendering as a goal.
After validator.w3.org I planned to try Bobby validator, which
promises reasonable apearence on all major browsers for complient
pages. That needs syntactic correctness before checking the
accessibility recomendations.
I have some experience in attempts to make things more standard,
it is nearly impossible, and not only in FreeBSD. I give up.

(Yes, I know, some brave souls manage to do progress in this field -
Thanks, guys! There are people appreciating your efforts!)

My PRs standards/46504, www/63551, and www/63552 can be closed too.
I cannot return to them within a year in any case.

Best regards,
-- 
V.Chukharev

Reply to maintainer follows.

On Mon, 24 May 2004 03:21:59 -0700 (PDT), Andrey A. Chernov  
<ache@FreeBSD.org> wrote:

> Synopsis: [Patch] WebMagick generates nonstandard html

> The  main  goal  here  is to produce most compatible html, i.e. rendered
> identically by most of browsers, and not pure standard compliance. I not
> see how your fixes can help identical rendering, but I see that it broke

I thought a secondary goal exists, being standards complient.
Mea culpa, it does not.

> it  in several places. Some changes are pure nosense, like changing tags
> case, some does nothing to rendering. If you'll find browser that render
> generated  pages in wrong way and will find a fix for it which not broke
> other  browsers  in  the  same time (at least Mozilla, IE, old Netscape,
> Opera should be tested), you are welcome.

I tested only with Mozilla, IE, Opera and w3m. Didn't see any change
in rendering for one browser (rendering by IE and w3m are not identical).
Little speed up does not count - suspect myself being inclined.
Sure, testing was insufficient.

You do not show what it broke, I cannot comment on that.

Close the PR.

> http://www.freebsd.org/cgi/query-pr.cgi?pr=67070

Best regards,
-- 
V.Chukharev
Comment 4 Andrey A. Chernov freebsd_committer freebsd_triage 2004-05-27 01:03:31 UTC
State Changed
From-To: feedback->closed

Some of your fixes integrated with just committed port update