more encoding
This commit is contained in:
parent
da42b19d6b
commit
af733b53ca
6 changed files with 10 additions and 16 deletions
|
@ -145,7 +145,7 @@ and of course start organising your images :-)
|
|||
// only index the first pages of each term
|
||||
$page->add_html_header('<meta name="robots" content="noindex, nofollow">');
|
||||
}
|
||||
$query = url_escape(implode(' ', $this->search_terms));
|
||||
$query = url_escape(Tag::caret(Tag::implode($this->search_terms)));
|
||||
$page->add_block(new Block("Images", $this->build_table($images, "#search=$query"), "main", 10, "image-list"));
|
||||
$this->display_paginator($page, "post/list/$query", null, $this->page_number, $this->total_pages, true);
|
||||
} else {
|
||||
|
|
|
@ -163,12 +163,6 @@ class TagList extends Extension
|
|||
$event->panel->add_block($sb);
|
||||
}
|
||||
|
||||
private function tag_link(string $tag): string
|
||||
{
|
||||
$u_tag = url_escape($tag);
|
||||
return make_link("post/list/$u_tag/1");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the minimum number of times a tag needs to be used
|
||||
* in order to be considered in the tag list.
|
||||
|
@ -297,7 +291,7 @@ class TagList extends Extension
|
|||
foreach ($tag_data as $row) {
|
||||
$h_tag = html_escape($row['tag']);
|
||||
$size = sprintf("%.2f", (float)$row['scaled']);
|
||||
$link = $this->tag_link($row['tag']);
|
||||
$link = $this->theme->tag_link($row['tag']);
|
||||
if ($size<0.5) {
|
||||
$size = 0.5;
|
||||
}
|
||||
|
@ -363,7 +357,7 @@ class TagList extends Extension
|
|||
$h_lastLetter = html_escape($lastLetter);
|
||||
$html .= "<p>$h_lastLetter<br>";
|
||||
}
|
||||
$link = $this->tag_link($tag);
|
||||
$link = $this->theme->tag_link($tag);
|
||||
$h_tag = html_escape($tag);
|
||||
$html .= "<a href='$link'>$h_tag ($count)</a>\n";
|
||||
}
|
||||
|
@ -410,7 +404,7 @@ class TagList extends Extension
|
|||
$lastLog = $scaled;
|
||||
$html .= "<p>$lastLog<br>";
|
||||
}
|
||||
$link = $this->tag_link($row['tag']);
|
||||
$link = $this->theme->tag_link($row['tag']);
|
||||
$html .= "<a href='$link'>$h_tag ($count)</a>\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -305,9 +305,9 @@ class TagListTheme extends Themelet
|
|||
}
|
||||
}
|
||||
|
||||
protected function tag_link(string $tag): string
|
||||
public function tag_link(string $tag): string
|
||||
{
|
||||
$u_tag = url_escape($tag);
|
||||
$u_tag = url_escape(Tag::caret($tag));
|
||||
return make_link("post/list/$u_tag/1");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ class ViewImage extends Extension
|
|||
$image_id = int_escape($event->get_arg(0));
|
||||
|
||||
if (isset($_GET['search'])) {
|
||||
$search_terms = explode(' ', $_GET['search']);
|
||||
$search_terms = Tag::explode(Tag::decaret($_GET['search']));
|
||||
$query = "#search=".url_escape($_GET['search']);
|
||||
} else {
|
||||
$search_terms = [];
|
||||
|
|
|
@ -38,7 +38,7 @@ class ViewImageTheme extends Themelet
|
|||
protected function build_pin(Image $image)
|
||||
{
|
||||
if (isset($_GET['search'])) {
|
||||
$query = "search=".url_escape($_GET['search']);
|
||||
$query = "search=".url_escape(Tag::caret($_GET['search']));
|
||||
} else {
|
||||
$query = null;
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ class CustomIndexTheme extends IndexTheme
|
|||
$query = null;
|
||||
$page_title = $config->get_string(SetupConfig::TITLE);
|
||||
} else {
|
||||
$search_string = implode(' ', $this->search_terms);
|
||||
$query = url_escape($search_string);
|
||||
$search_string = Tag::implode($this->search_terms);
|
||||
$query = url_escape(Tag::caret($search_string));
|
||||
$page_title = html_escape($search_string);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue