[aur-dev] [PATCH] Encode search string for use in anchor tags.
Sorting, and viewing more results resets the search if you search for '#' in 1.5.3. This should fix that bug. Signed-off-by: Loui Chang <louipc.ist@gmail.com> --- web/template/pkg_search_results.php | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index 5af02ef..2087abc 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -1,3 +1,7 @@ +<?php +# Encode search string +$K = urlencode($K); +?> <form action='packages.php?<?php print $_SERVER['QUERY_STRING'] ?>' method='post'> <center> -- 1.6.0.5
I think I'll push all these out tonight when I get home. Except with this one can you put this code in the search function rather than the template? I think we want to try keep code like this out of the templates, they should be as little php as possible. -- Callan Barrett
On Mon, Dec 22, 2008 at 11:24:18AM +0900, Callan Barrett wrote:
I think I'll push all these out tonight when I get home. Except with this one can you put this code in the search function rather than the template? I think we want to try keep code like this out of the templates, they should be as little php as possible.
Yeah I wasn't sure about that one. I felt that it would be awkward in the search function because it's not needed there at all, so I decided to put it in the template. I guess it could do the same as the stats, and have a function for that specific search results 'widget'. What sounds good?
On Mon, Dec 22, 2008 at 1:20 PM, Loui Chang <louipc.ist@gmail.com> wrote:
On Mon, Dec 22, 2008 at 11:24:18AM +0900, Callan Barrett wrote:
I think I'll push all these out tonight when I get home. Except with this one can you put this code in the search function rather than the template? I think we want to try keep code like this out of the templates, they should be as little php as possible.
Yeah I wasn't sure about that one. I felt that it would be awkward in the search function because it's not needed there at all, so I decided to put it in the template. I guess it could do the same as the stats, and have a function for that specific search results 'widget'.
What sounds good?
Pushed, we'll just deal with it later when we have better functions for all this stuff. -- Callan Barrett
participants (2)
-
Callan Barrett
-
Loui Chang