添加urlencode处理url特殊字符,包括#,'等
This commit is contained in:
parent
509f3331ee
commit
7d806cacd0
|
@ -42,9 +42,9 @@ foreach($this->keywords as $cg) :
|
|||
?>
|
||||
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
|
||||
<ul>
|
||||
<li><a href='/data/tag/<?php echo htmlspecialchars($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<?php else : ?>
|
||||
<li><a href='/data/tag/<?php echo htmlspecialchars($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
@ -39,7 +39,7 @@ foreach($this->keys as $cg) :
|
|||
$i=0;
|
||||
endif;
|
||||
if ($i==0) echo '<div id="'.$cg->keytype.'"><ul>';
|
||||
echo '<li><a href="/data/tag/key/'.$cg->keyword.'">'.$cg->keyword.'</a></li>';
|
||||
echo '<li><a href="/data/tag/key/'.urlencode($cg->keyword).'">'.$cg->keyword.'</a></li>';
|
||||
endforeach;
|
||||
echo '</ul></div>';
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue