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

Re: webwml/english/mirror/Mirrors.masterlist



Josip Rodin said:
> On Thu, Jan 09, 2003 at 09:02:29PM +0900, Tomohiro KUBOTA wrote:
> > As I wrote in the "Unidetified subject!" thread, I rewrite the
> > Mirrors.masterlist file to use ASCII characters only (including
> > SGML entity expressions which themselves are written in ASCII).
> > 
> > Howevere, I found that these SGML entities themselves appear in
> > the webpage of
> > 
> >    http://www.debian.org/mirror/official_sponsors.en.html
> > 
> > against my intension.  This is because "&" is processed in some
> > scripts and modified into "&".
> 
> Haha. Good one. I think it's easiest to make mirror_list.pl replace "&\s"
> with "&\s", i.e. have it work properly with "foo & bar" but not mess
> with entities. "foo&bar" shouldn't happen, and we don't have any mirrors at
> AT&T. :)

I think it would be much better to remove any hard-coded entity fixes
from the script(s) and instead use HTML::Entities::encode on everything
that is going to be output as HTML.  Anything to be output as plain text
can just go through the normal sanitising and skip the encode() bit.

The HTML::Entities module is provided by libhtml-parser-perl.

Andrew.

-- 
Andrew Shugg <andrew@neep.com.au>                   http://www.neep.com.au/

"Just remember, Mr Fawlty, there's always someone worse off than yourself."
"Is there?  Well I'd like to meet him.  I could do with a good laugh."



Reply to: