Add escape to names, remove garbage

This commit is contained in:
Alex Lushpai 2014-12-12 03:41:05 +03:00
parent e05784c3b6
commit 7e50f12a83

View File

@ -2,7 +2,7 @@
<yml_catalog date="{$smarty.now|date_format:'%Y-%m-%d %H:%M'}"> <yml_catalog date="{$smarty.now|date_format:'%Y-%m-%d %H:%M'}">
<shop> <shop>
<name>{$shop_name}</name> <name>{$shop_name}</name>
<company>{$yamarket_company_name}</company> <company>{$company}</company>
<url>{$shop_url}</url> <url>{$shop_url}</url>
<platform>PrestaShop</platform> <platform>PrestaShop</platform>
<currencies> <currencies>
@ -15,11 +15,10 @@
<categories> <categories>
{foreach from=$categories item=cat name=categories} {foreach from=$categories item=cat name=categories}
{if $cat.id_category!=2} {if $cat.id_category!=2}
<category id="{$cat.id_category}"{if $cat.id_parent and $cat.id_parent!=2} parentId="{$cat.id_parent}"{/if}>{$cat.name}</category> <category id="{$cat.id_category}"{if $cat.id_parent and $cat.id_parent!=2} parentId="{$cat.id_parent}"{/if}>{$cat.name|escape}</category>
{/if} {/if}
{/foreach} {/foreach}
</categories> </categories>
{if $yamarket_delivery_price}<local_delivery_cost>{$yamarket_delivery_price}</local_delivery_cost>{/if}
<offers> <offers>
{foreach from=$products item=offer name=products} {foreach from=$products item=offer name=products}
<offer available="{if $offer.available_for_order}true{else}false{/if}" id="{$offer.id_product}"> <offer available="{if $offer.available_for_order}true{else}false{/if}" id="{$offer.id_product}">
@ -29,12 +28,12 @@
<currencyId>{$currency}</currencyId> <currencyId>{$currency}</currencyId>
<categoryId>{$offer.id_category_default}</categoryId> <categoryId>{$offer.id_category_default}</categoryId>
<picture>{$offer.picture}</picture> <picture>{$offer.picture}</picture>
<name>{$offer.name}</name> <name>{$offer.name|escape}</name>
{if $offer.article} {if $offer.article}
<param name="article">{$offer.article}</param> <param name="article">{$offer.article|escape}</param>
{/if} {/if}
</offer> </offer>
{/foreach} {/foreach}
</offers> </offers>
</shop> </shop>
</yml_catalog> </yml_catalog>