[pmwiki-users] A problem with HTML validation and including subsections

chr at home.se chr at home.se
Thu Dec 15 11:44:29 CST 2005


Hi

I've tried to validate a few pages and came across a problem. A minimal
example of a page that doesn't validate properly is illustrated here:

	http://www.pmwiki.org/wiki/Test/HTMLValidationWithIncludes

To validate it, simply go to:

	http://validator.w3.org/check?uri=http%3A%2F%2Fwww.pmwiki.org%2Fwiki%2FTest%2FHTMLValidationWithIncludes&charset=%28detect+automatically%29&doctype=Inline


The reason this happens is the following markup in the wiki page:

	(:include HTMLValidationWithIncludes-help1#list#listend:)

	(:include HTMLValidationWithIncludes-help2#list#listend:)

which causes two anchors '[[#list]]' being inserted into page. As a 
result, the double anchors makes the page become not validated.

A very crude fix would be to make (:include:) not take the first anchor 
part, but this will probably break lots of other stuff.

Any other ideas?  Should an anchor that is inserted more than once on a 
page automatically be renamed to avoid this validation issue? Should a 
warning be issued?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list