kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-10-05 03:26 pm

[dw-free] http://bugs.dwscoalition.org/show_bug.cgi?id=3107

[commit: http://hg.dwscoalition.org/dw-free/rev/91c6778b13fb]

http://bugs.dwscoalition.org/show_bug.cgi?id=3107

Always print the escaped interest name.

Patch by [personal profile] kareila.

Files modified:
  • htdocs/interests.bml
--------------------------------------------------------------------------------
diff -r 1924e69c861a -r 91c6778b13fb htdocs/interests.bml
--- a/htdocs/interests.bml	Tue Oct 05 09:47:53 2010 -0500
+++ b/htdocs/interests.bml	Tue Oct 05 10:25:55 2010 -0500
@@ -400,8 +400,9 @@ body<=
         if ( ( $exists && $e_int ne $interest ) || length( $e_int ) > LJ::CMAX_SITEKEYWORD ) {
 
             # if the searched-for interest is too long, we use the short version from here on
-            $interest = $exists ? $interest : substr ( $e_int, 0, LJ::CMAX_SITEKEYWORD );
-            $ret .= "<?p " . BML::ml( '.error.longinterest', { sitename => $LJ::SITENAMESHORT, old_int => $e_int, new_int => $interest, maxlen => LJ::CMAX_SITEKEYWORD } ) . " p?>";
+            my $e_int_long = $e_int;
+            $e_int = $exists ? LJ::ehtml( $exists ) : substr( $e_int, 0, LJ::CMAX_SITEKEYWORD );
+            $ret .= "<?p " . BML::ml( '.error.longinterest', { sitename => $LJ::SITENAMESHORT, old_int => $e_int_long, new_int => $e_int, maxlen => LJ::CMAX_SITEKEYWORD } ) . " p?>";
         }
 
         $ret .= "<table>";
@@ -487,14 +488,14 @@ body<=
             }
 
             if (@cl) {
-                $ret .= "<h1>" . BML::ml(".communities.header", {'interest' => $interest}) ."</h1>";
+                $ret .= "<h1>" . BML::ml( ".communities.header", { interest => $e_int } ) ."</h1>";
                 $ret .= "<p class='matches'><b>" . BML::ml('.matches2', {'num' => $count}) . "</b><ul class='contentlist'>$list</ul></p>";
             }
         }
 
         ##### users
 
-        $ret .= "<h1>" . BML::ml(".users.header", {'interest' => $interest}) . "</h1>\n<p class='interestinfo'>";
+        $ret .= "<h1>" . BML::ml( ".users.header", { interest => $e_int } ) . "</h1>\n<p class='interestinfo'>";
         if ($remote) {
             $ret .= " " . BML::ml('.addint2', {'aopts' => "href='$LJ::SITEROOT/interests?mode=add&amp;intid=$intid'"});
         }
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org