Merge pull request #577 from im-mi/fix-tag-list-starts-with-headings

Fix "starts-with" header in tag list when escaping required
This commit is contained in:
Shish 2016-09-01 11:16:10 +01:00 committed by GitHub
commit 2258116a31

View file

@ -297,13 +297,15 @@ class TagList extends Extension {
$lastLetter = "";
foreach($tag_data as $row) {
$h_tag = html_escape($row['tag']);
$count = $row['count'];
if($lastLetter != mb_strtolower(substr($h_tag, 0, count($starts_with)+1))) {
$lastLetter = mb_strtolower(substr($h_tag, 0, count($starts_with)+1));
$html .= "<p>$lastLetter<br>";
$tag = $row['tag'];
if($lastLetter != mb_strtolower(substr($tag, 0, count($starts_with)+1))) {
$lastLetter = mb_strtolower(substr($tag, 0, count($starts_with)+1));
$h_lastLetter = html_escape($lastLetter);
$html .= "<p>$h_lastLetter<br>";
}
$link = $this->tag_link($row['tag']);
$link = $this->tag_link($tag);
$h_tag = html_escape($tag);
$count = $row['count'];
$html .= "<a href='$link'>$h_tag&nbsp;($count)</a>\n";
}