escape URL fragments in image pagination, and use a more meaningful template variable name
if we're not going to list tags in image search results, don't do the query (and don't leave the dead code in place in a comment)
code cleanup on image chooser