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

Bug#181872: Patch



On Thu, Mar 13, 2003 at 06:27:15PM +0100, Josip Rodin wrote:
> On Thu, Mar 13, 2003 at 03:42:54PM +0100, Frank Lichtenheld wrote:
> > tags 181872 + patch
> > thanks
> > 
> > [Problem of '<URL: http://scummvm.sf.net/compatibility.php>'
> > being converted to 
> > '<URL: <a href="http://scummvm.sf.net/compatibility.php>">http://scummvm.sf.net/compatibility.php></a>']
> > 
> > The following patch should fix the problem. It allows whitespaces
> > beetween "<URL:" and "http://";. I've also added some more handling of
> > html special chars.
> > 
> > --- pages.pl    30 Jan 2003 14:43:59 -0000      1.9
> > +++ pages.pl    13 Mar 2003 14:30:56 -0000
> > -               $long_desc =~ s,<((URL:)?http://[\S~-]+?/?)>,\&lt\;$1\&gt\;,go;
> > +               $long_desc =~ s,<((URL:)?\s*http://[\S~-]+?/?)>,\&lt\;$1\&gt\;,go;
> > +               $long_desc =~ s/</\&lt\;/go;
> > +               $long_desc =~ s/>/\&gt\;/go;
> 
> The right fix would be simply
> $long_desc =~ s,<(?:URL:\s*)?(http://[^>]+)\s*>,\&lt\;$1\&gt\;,go;
> 
> Right?

Yours would do also. The main difference in result is that you delete
the 'URL:' while mine preserves it. Only a cosmetic difference.

> > +               $long_desc =~ s/\&/\&amp\;/go;
> 
> That sounds like a fix for another bug, and it doesn't look like it would
> actually handle the read &amp;s in descriptions...

You're right, that this line (also the two other above) are not
related to the bug. But i don't understand your problem with it. It is
actually a fault to have bare &'s in the html-Code (look at the
example site from the bug one paragraph above).

Greetings,
	Frank

-- 
*** Frank Lichtenheld <frank@lichtenheld.de> ***
          *** http://www.djpig.de/ ***
see also: - http://www.usta.de/
          - http://fachschaft.physik.uni-karlsruhe.de/



Reply to: