[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mhonarc
Subject:    Re: Monthabr not working correctly with HTML-code
From:       Earl Hood <ehood () hydra ! acs ! uci ! edu>
Date:       1999-08-25 6:40:32
[Download RAW message or body]

On August 24, 1999 at 12:55, "Peter Seitz jun." wrote:

> <MONTHSABR>
> Jan:Feb:M&auml;r:Apr:Mai:Jun:Jul:Aug:Sep:Okt:Nov:Dez
> </MONTHSABR>
...
> I guess MHonArc is not parsing the definitions correctly when there 
> are special caracters like "&" or ";" in the definition field.
> 
> Earl, can you please check the perl code or this issue. I asume that 
> it won't work with the <Month>, <Weekdays> and <WeedkaysAbr> as well 
> because they use the same subroutine.
> 
> I think the problem is in mhrcfile.pl in subroutine get_list_content:
> 
>     while (<$filehandle>) {
>     last  if /^\s*<\/$gi\s*>/i;
>     next  unless /\S/;
>     s/\r?\n?$//;
>     push(@items, split(/[:;]/, $_));
>                          ^^
> The ";" is making the troubles. I don't know if it is needed for 
> anything else.

The ';' is used as a separator for other resources, so ';' was included
(undocumented) for the "list"-type resources for consistancy.  I also
never expected anyone to try to use entity references in something like
MONTHSABR.  But it makes sense.

Just delete the ';' in the regex to split().  I'll removed it for
the next releases, since its use is not documented for the resources
the get_list_content is used.

	--ewh

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic