Fix double encoding of special characters in document tags

This commit is contained in:
Kijin Sung 2023-09-12 22:52:26 +09:00
parent fead32337e
commit ec674dc25f
3 changed files with 4 additions and 3 deletions

View file

@ -57,7 +57,7 @@
{@ $tag_list = $oDocument->get('tag_list') } {@ $tag_list = $oDocument->get('tag_list') }
<span class="tags" cond="count($tag_list ?: [])"> <span class="tags" cond="count($tag_list ?: [])">
<!--@foreach($tag_list as $tag)--> <!--@foreach($tag_list as $tag)-->
<a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}" class="tag" rel="tag">{htmlspecialchars($tag)}</a><span>,</span> <a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}" class="tag" rel="tag">{escape($tag, false)}</a><span>,</span>
<!--@end--> <!--@end-->
</span> </span>
<a class="document_{$oDocument->document_srl} action" href="#popup_menu_area" onclick="return false">{$lang->cmd_document_do}</a> <a class="document_{$oDocument->document_srl} action" href="#popup_menu_area" onclick="return false">{$lang->cmd_document_do}</a>

View file

@ -104,7 +104,7 @@
<span class="tags" cond="$tag_list"> <span class="tags" cond="$tag_list">
<i class="xi-tags"></i> <i class="xi-tags"></i>
<!--@foreach($tag_list as $tag)--> <!--@foreach($tag_list as $tag)-->
<a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}" class="tag" rel="tag">{htmlspecialchars($tag)}</a><span>,</span> <a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}" class="tag" rel="tag">{escape($tag, false)}</a><span>,</span>
<!--@end--> <!--@end-->
</span> </span>
<a class="document_{$oDocument->document_srl} action" href="#popup_menu_area" onclick="return false">{$lang->cmd_document_do}</a> <a class="document_{$oDocument->document_srl} action" href="#popup_menu_area" onclick="return false">{$lang->cmd_document_do}</a>

View file

@ -1436,6 +1436,7 @@ class DocumentModel extends Document
elseif($search_target == 'tag') elseif($search_target == 'tag')
{ {
$query_id = 'document.getDocumentListWithinTag'; $query_id = 'document.getDocumentListWithinTag';
$search_keyword = htmlspecialchars_decode($search_keyword);
} }
$args->{'s_' . $search_target} = $search_keyword; $args->{'s_' . $search_target} = $search_keyword;
} }