Page 1 of 1

newspro .nzb problem with ids containing ampersand (&)

Posted: Mon Jan 26, 2004 9:49 pm
by SiskoBen
Hi Alex,

I have just discovered the .nzb feature and am trying to use it. So far it looks very nice and extremely handy.
I found one problem (which i don't know if it's a bug in the newspro nzb support or in the nzb creator).

in the lines where there is an ampersand (&) in the id (i am not sure if the part between "part#of###." and "@powerpost" is called like this) Newspro will not show those parts in the imported list.

Here is a piece of the nzb in which there is the ampersand:
<segments>
<segment bytes="320000" number="1">part1of125.zzXatt56sCzyFRbh&90a@powerpost2000AA.local</segment>

It seems that this nzb is created with "YENC-POWER-POST-A&A-v11" (powerpost.cjb.net)

Regards,
Arjan

Posted: Tue Jan 27, 2004 12:29 am
by slotboxed
I think I have noticed a related behavior - when a subject line contains an ampersand... in the case I've seen, the ampersand is removed and the next character is turned into a shortcut key.

Posted: Tue Jan 27, 2004 12:33 am
by alex
the .nzb file above is incorrect (against xml specs)

instead of & should be something like & #38; or &

i've reported the bug to the author of the utility that produces it, actually he made several buggy releases before.

specs:

"The ampersand character (&) and the left angle bracket (<) may appear in their literal form only when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they must be escaped using either numeric character references or the strings "&" and "<" respectively. The right angle bracket (>) may be represented using the string ">", and must, for compatibility, be escaped using ">" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section."

but i guess i'll need to handle that since the devil is out there already.

Posted: Tue Jan 27, 2004 5:59 am
by SiskoBen
Thanks for the explanation and confirmation that you kept to the proper specifications.
I am sure that you will do the right thing to handle this. I will patiently wait for a new version of either tool.

Best regards,
Arjan

Posted: Tue Jan 27, 2004 9:28 pm
by alex
i had a number of other similar reports so i just released the fix as 3.74.
i'm working on something else and otherwise it could take a week or so to wait until the next release, it was faster to handle it this way.

Posted: Wed Jan 28, 2004 5:58 am
by SiskoBen
Thanks Alex,
I'll download it immediately and install it when i have the opportunity.
Best regards,
Arjan

Posted: Sun Feb 08, 2004 10:54 pm
by amfibia
Alex,

It seems the problem with the NZB files created by powerpost is still there. following part of problem giving nzb.
Newspro refuses to open it in the import base. If needed I can provide you with the complete NZB.

Amfibia

*****

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE nzb PUBLIC "-//newzBin//DTD NZB 0.9//EN" "http://www.newzbin.com/DTD/nzb/nzb-0.9.dtd">
<nzb xmlns="http://www.newzbin.com/DTD/2003/nzb">
<file poster="JollyJoker@NO-SPAM.com (Jolly Joker)" date="1076147619" subject="Jolly Joker<><>Post<><>NETTAKOTSIRA[001/105] - 'NETTAKOTSIRA.PAR2' yEnc (1/1)">
<groups>
<group>alt.binaries.misc</group>
</groups>
<segments>
<segment bytes="73904" number="1">part1of1.VPCvKOwxegs60yjKLO2r@powerpost2000AA.local</segment>
</segments>
</file>
<file poster="JollyJoker@NO-SPAM.com (Jolly Joker)" date="1076147619" subject="Jolly Joker<><>Post<><>NETTAKOTSIRA[002/105] - 'NETTAKOTSIRA.r00' yEnc (001/131)">
<groups>
<group>alt.binaries.misc</group>
</groups>
<segments>
<segment bytes="384000" number="1">part1of131.I4Dc2mp&xQRIFv9OqbmT@powerpost2000AA.local</segment>

etc etc etc......

Posted: Mon Feb 09, 2004 12:02 am
by alex
i know, it is because power post lefts '<' and '>' inside the xml tag; according to xml specs '<' must be escaped and '>' must be escaped for compatibility. '>' is currently used in newspro as delimiter to make parsing faster but i'll change it very shortly.

Posted: Mon Feb 09, 2004 8:31 am
by amfibia
Thanks Alex,

I'll be waiting to download and try it.

A.

Posted: Mon Feb 09, 2004 11:35 am
by alex
http://www.netwu.com/newspro/npr3742.zip

it will handle this plus should cope with buggy .nzb's from www.binaries.nl

Posted: Mon Feb 09, 2004 11:51 am
by amfibia
Works like a charm :D

Thanks again!