<commit_before>{if !$sSearchResults.sResults}

    {* no search results *}
    {block name="search_ajax_inner_no_results"}
        <ul class="results--list">
            <li class="list--entry entry--no-results result--item">{s name="SearchAjaxNoResults"}{/s}</li>
        </ul>
    {/block}

{else}

    {block name="search_ajax_inner"}
        <ul class="results--list">
            {foreach $sSearchResults.sResults as $search_result}

                {* Each product in the search result *}
                {block name="search_ajax_list_entry"}
                    <li class="list--entry block-group result--item">
						<a class="search-result--link" href="{$search_result.link}" title="{$search_result.name|escape}">

							{* Product image *}
							{block name="search_ajax_list_entry_media"}
								<span class="entry--media block">
									{if $search_result.image.thumbnails[0]}
										<img srcset="{$search_result.image.thumbnails[0].sourceSet}" alt="{$search_result.name|escape}" class="media--image">
									{else}
										<img src="{link file='frontend/_public/src/img/no-picture.jpg'}" alt="{"{s name='ListingBoxNoPicture'}{/s}"|escape}" class="media--image">
									{/if}
								</span>
							{/block}

							{* Product name *}
							{block name="search_ajax_list_entry_name"}
								<span class="entry--name block">
									{$search_result.name|escapeHtml}
								</span>
							{/block}

							{* Product price *}
							{block name="search_ajax_list_entry_price"}
								<span class="entry--price block">
                                    {$sArticle = $search_result}
                                    {*reset pseudo price value to prevent discount boxes*}
                                    {$sArticle.has_pseudoprice = 0}
                                    {include file="frontend/listing/product-box/product-price.tpl" sArticle=$sArticle}
								</span>
							{/block}
						</a>
                    </li>
                {/block}
            {/foreach}

            {* Link to show all founded products using the built-in search *}
            {block name="search_ajax_all_results"}
                <li class="entry--all-results block-group result--item">

                    {* Link to the built-in search *}
                    {block name="search_ajax_all_results_link"}
                        <a href="{url controller="search"}?sSearch={$sSearchRequest.sSearch}" class="search-result--link entry--all-results-link block">
                            <i class="icon--arrow-right"></i>
                            {s name="SearchAjaxLinkAllResults"}{/s}
                        </a>
                    {/block}

                    {* Result of all founded products *}
                    {block name="search_ajax_all_results_number"}
                        <span class="entry--all-results-number block">
                            {$sSearchResults.sArticlesCount} {s name='SearchAjaxInfoResults'}{/s}
                        </span>
                    {/block}
                </li>
            {/block}
        </ul>
    {/block}
{/if}<commit_msg>SW-15823 - Fix encoding on Ajax Search 'Show all results' (#701)<commit_after>{if !$sSearchResults.sResults}

    {* no search results *}
    {block name="search_ajax_inner_no_results"}
        <ul class="results--list">
            <li class="list--entry entry--no-results result--item">{s name="SearchAjaxNoResults"}{/s}</li>
        </ul>
    {/block}

{else}

    {block name="search_ajax_inner"}
        <ul class="results--list">
            {foreach $sSearchResults.sResults as $search_result}

                {* Each product in the search result *}
                {block name="search_ajax_list_entry"}
                    <li class="list--entry block-group result--item">
						<a class="search-result--link" href="{$search_result.link}" title="{$search_result.name|escape}">

							{* Product image *}
							{block name="search_ajax_list_entry_media"}
								<span class="entry--media block">
									{if $search_result.image.thumbnails[0]}
										<img srcset="{$search_result.image.thumbnails[0].sourceSet}" alt="{$search_result.name|escape}" class="media--image">
									{else}
										<img src="{link file='frontend/_public/src/img/no-picture.jpg'}" alt="{"{s name='ListingBoxNoPicture'}{/s}"|escape}" class="media--image">
									{/if}
								</span>
							{/block}

							{* Product name *}
							{block name="search_ajax_list_entry_name"}
								<span class="entry--name block">
									{$search_result.name|escapeHtml}
								</span>
							{/block}

							{* Product price *}
							{block name="search_ajax_list_entry_price"}
								<span class="entry--price block">
                                    {$sArticle = $search_result}
                                    {*reset pseudo price value to prevent discount boxes*}
                                    {$sArticle.has_pseudoprice = 0}
                                    {include file="frontend/listing/product-box/product-price.tpl" sArticle=$sArticle}
								</span>
							{/block}
						</a>
                    </li>
                {/block}
            {/foreach}

            {* Link to show all founded products using the built-in search *}
            {block name="search_ajax_all_results"}
                <li class="entry--all-results block-group result--item">

                    {* Link to the built-in search *}
                    {block name="search_ajax_all_results_link"}
                        <a href="{url controller="search"}?sSearch={$sSearchRequest.sSearch|urlencode}" class="search-result--link entry--all-results-link block">
                            <i class="icon--arrow-right"></i>
                            {s name="SearchAjaxLinkAllResults"}{/s}
                        </a>
                    {/block}

                    {* Result of all founded products *}
                    {block name="search_ajax_all_results_number"}
                        <span class="entry--all-results-number block">
                            {$sSearchResults.sArticlesCount} {s name='SearchAjaxInfoResults'}{/s}
                        </span>
                    {/block}
                </li>
            {/block}
        </ul>
    {/block}
{/if}
{'fraction_non_alphanumeric': 0.13883139627447857, 'fraction_numerical': 0.002228944435599427, 'mean_word_length': 1.7019354838709677, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5620065', 'n_tokens_mistral': 2112, 'n_tokens_neox': 1718, 'n_words': 322}