Author: dom Date: 2006-04-20 15:41:02 +0100 (Thu, 20 Apr 2006) New Revision: 775
Modified: trunk/Changes trunk/lib/OpenGuides/Template.pm Log: Quick fix to partially fix HTML spam problem (references #79)
Modified: trunk/Changes =================================================================== --- trunk/Changes 2006-04-20 14:17:39 UTC (rev 774) +++ trunk/Changes 2006-04-20 14:41:02 UTC (rev 775) @@ -11,6 +11,7 @@ #93 Upgrade to new Google Maps API (for smaller javascript download) #103 Fix empty Category/Locale list bug. #54 Fix RSS redirection for backwards compatibility. + #79 Partial fix to help combat HTML spam
0.52 5 March 2006 IMPORTANT CHANGE: "supersearch.cgi" is now simply "search.cgi". If you
Modified: trunk/lib/OpenGuides/Template.pm =================================================================== --- trunk/lib/OpenGuides/Template.pm 2006-04-20 14:17:39 UTC (rev 774) +++ trunk/lib/OpenGuides/Template.pm 2006-04-20 14:41:02 UTC (rev 775) @@ -262,6 +262,13 @@ } else { my $categories_text = $q->param('categories'); my $locales_text = $q->param('locales'); + + # Basic sanity-checking. Probably lives elsewhere. + $categories_text =~ s/</</g; + $categories_text =~ s/>/>/g; + $locales_text =~ s/</</g; + $locales_text =~ s/>/>/g; + @catlist = sort grep { s/^\s+//; s/\s+$//; $_; } # trim lead/trail space split("\r\n", $categories_text); @loclist = sort grep { s/^\s+//; s/\s+$//; $_; } # trim lead/trail space