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:
commit
2258116a31
1 changed files with 8 additions and 6 deletions
|
@ -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 ($count)</a>\n";
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue