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

Problem in RSS routine on 44.3



I'm a little behind, just getting 44.3 running.  I ran into a little quirk
with the RSS inline replace:

<Brazilian> testthis is
<rss="http://www.thebesite.com/3/about/headlines.php3?type=rss">

<Brazilian> testthis
<regurg> Brazilian:
<rss="http://www.thebesite.com/3/about/headlines.php3?type=rss">

In spite of not being 'the brightest perl in the sea', I did however manage to
track this down after awhile and figure out that when it does the in-line
replacement of the <rss=...> with the result of the query, it was getting
confused with the ? in the original URL, mistaking it for a regex.

The following patch in Reply.pl seemed to fix this:

} else {

        $replace =~ s/\?/\\\?/;  # patch -- swap out the ? for a \?

        # original code after this

        $theMsg =~ s/$replace/$result/;
        $theMsg = "$who: $theMsg";
}

This being right around line 201 of Reply.pl (I added a couple of comment
lines somewhere up above in my source so this number isn't exact to the stock
Reply.pl)

Not being that much of a perl wizard, was this a decent way to deal with this
or is there something better?  Probably could stand to catch other goofy
characters than just ? but..


 :        Bob Maple          : If computers get too powerful, we can just  :
 :   bmaple at burner.com    : organize them into a government committee.. :
 : www.dimensional.com/~bobm : That will do them in for sure.              :