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

Bug? in wml pass 7 found (with the help of todo page)



        Hi!

 I found a bug in wml pass 7 and like to have it confirmed that my
interpretation is correct before filing a bugreport.  Given that Denis
reads here anyway and he is the maintainer for the package I guess he
should know if he likes a bugreport for it and have it documented there.

 It seems like this bug appears due to a feature that was built in.  To
be a little bit more precise about what's going on:

 In line 78 of english/template/debian/todoitem.wml:
<a href=<get-var url/>><get-var urlname/></a>

 Now take the line from 80ddtp.wml:
<item url="../../intl/l10n/po-debconf/" urlname="po-debconf translation center">

 I've left out the unneccecary data for this problem.  This would be
rendered up until pass 6 as:
<item url=../../intl/l10n/po-debconf/>po-debconf translation center</a>

 pass 7 changes it to:
<item url="../../intl/l10n/po-debconf"/>po-debconf translation center</a>

 This seems to have been done as feature for xhtml conformance things
but raises problems in here.

 A quick workaround for us would be to change the line 78 in
todoitem.wml like this:
-<a href=<get-var url/>><get-var urlname/></a>
+<a href="<get-var url/>"><get-var urlname/></a>

 That way we won't depend on pass 7 to get the quotes and avoid this
imho unexpectable 'feature'.

 I'll commit the changes to the todoitem.wml which is a good thing[tm]
anyway.  But I guess this should be corrected or rather de-featurized or
whatever in wml anyway.

 I guess it is quite clear what I am talking about and I have included
all the informations needed.  Thanks.

 Ah yes, also took a quick look at the wml_p7_htmlfix script that does
that.  I think the line that this happens in is 288 (version 2.0.8-5,
current unstable):
        $tag =~ s@([A-Za-z_-]+=)([^\s\"\'><\[]+)(\s|/?>)@$1"$2"$3@sg;
                                                    ^^
 This seems to be the place where this happens.  Maybe we could also
workaround by using the following:
-<a href=<get-var url/>><get-var urlname/></a>
+<a href=<get-var url/> ><get-var urlname/></a>

 That is, adding a space should workaround the problem, too -- if we
really like to depend on pass 7 rather than do it right[tm] in the first
place....

 So long,
Alfie [why must it be always me to find such bug^Wproblems....]
-- 
Btw., do you know this?  <http://alfie.ist.org/babe.html>

Attachment: pgpw4_bO4dhH3.pgp
Description: PGP signature


Reply to: