Ignore:
Timestamp:
2010/12/29 13:10:01 (13 years ago)
Author:
Seasoft
Message:

#862(テンプレート上のエスケープを簡単に)
#628(未使用処理・定義などの削除)

  • Smarty 変数 tpl_start

#879(jQuery の ready イベントと競合する body の onload イベントを使用している)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/Smarty/templates/sphone/products/detail.tpl

    r19775 r19785  
    164164 
    165165    <!--★タイトル★--> 
    166     <h2 class="title"><!--{$tpl_subtitle|escape}--></h2> 
     166    <h2 class="title"><!--{$tpl_subtitle|h}--></h2> 
    167167 
    168168    <div id="detailarea"> 
     
    174174            <a 
    175175                <!--{if $arrProduct.main_large_image|strlen >= 1}--> 
    176                     href="<!--{$smarty.const.IMAGE_SAVE_URL}--><!--{$arrProduct.main_large_image|escape}-->" 
     176                    href="<!--{$smarty.const.IMAGE_SAVE_URL}--><!--{$arrProduct.main_large_image|h}-->" 
    177177                    class="expansion" 
    178178                    onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_expansion_on.gif','expansion01');" 
     
    181181                <!--{/if}--> 
    182182            > 
    183                 <img src="<!--{$arrFile[$key].filepath|escape}-->" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->" alt="<!--{$arrProduct.name|escape}-->" class="picture" /><br /> 
     183                <img src="<!--{$arrFile[$key].filepath|h}-->" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->" alt="<!--{$arrProduct.name|h}-->" class="picture" /><br /> 
    184184                <!--★拡大する★--> 
    185185                <!--{if $arrProduct.main_large_image|strlen >= 1}--> 
     
    212212                    <th colspan="2"> 
    213213                        <!--★商品名★--> 
    214                         <h2><!--{$arrProduct.name|escape}--></h2> 
     214                        <h2><!--{$arrProduct.name|h}--></h2> 
    215215                    </th> 
    216216                </tr> 
     
    288288                    </th> 
    289289                    <td> 
    290                             <a href="<!--{$arrProduct.comment1|escape}-->"> 
    291                                 <!--{$arrProduct.comment1|escape}--></a> 
     290                            <a href="<!--{$arrProduct.comment1|h}-->"> 
     291                                <!--{$arrProduct.comment1|h}--></a> 
    292292                    </td> 
    293293                </tr> 
     
    331331                        <!--{if $tpl_classcat_find1}--> 
    332332                            <!--▼規格1--> 
    333                             <dt><!--{$tpl_class_name1|escape}--></dt> 
     333                            <dt><!--{$tpl_class_name1|h}--></dt> 
    334334                            <dd> 
    335335                                <select name="classcategory_id1" 
     
    348348                        <!--{if $tpl_classcat_find2}--> 
    349349                            <!--▼規格2--> 
    350                             <dt><!--{$tpl_class_name2|escape}--></dt> 
     350                            <dt><!--{$tpl_class_name2|h}--></dt> 
    351351                            <dd> 
    352352                                <select name="classcategory_id2" 
     
    379379                            <!--{if !$arrProduct.favorite_count}--> 
    380380                                <a 
    381                                     href="javascript:fnModeSubmit('add_favorite','favorite_product_id','<!--{$arrProduct.product_id|escape}-->');" 
     381                                    href="javascript:fnModeSubmit('add_favorite','favorite_product_id','<!--{$arrProduct.product_id|h}-->');" 
    382382                                    onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/add_favolite_product_on.gif','add_favolite_product');" 
    383383                                    onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/add_favolite_product.gif','add_favolite_product');" 
     
    422422        <!--{if $arrProduct[$key] != ""}--> 
    423423            <div class="subarea"> 
    424                 <h3><!--★サブタイトル★--><!--{$arrProduct[$key]|escape}--></h3> 
     424                <h3><!--★サブタイトル★--><!--{$arrProduct[$key]|h}--></h3> 
    425425                <!--{assign var=ckey value="sub_comment`$smarty.section.cnt.index+1`"}--> 
    426426 
     
    434434                        <a 
    435435                            <!--{if $arrProduct[$lkey]|strlen >= 1}--> 
    436                                 href="<!--{$smarty.const.IMAGE_SAVE_URL}--><!--{$arrProduct[$lkey]|escape}-->" 
     436                                href="<!--{$smarty.const.IMAGE_SAVE_URL}--><!--{$arrProduct[$lkey]|h}-->" 
    437437                                class="expansion" 
    438                                 onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_expansion_on.gif', 'expansion_<!--{$lkey|escape}-->');" 
    439                                 onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/b_expansion.gif', 'expansion_<!--{$lkey|escape}-->');" 
     438                                onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_expansion_on.gif', 'expansion_<!--{$lkey|h}-->');" 
     439                                onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/b_expansion.gif', 'expansion_<!--{$lkey|h}-->');" 
    440440                                target="_blank" 
    441441                            <!--{/if}--> 
    442442                        > 
    443                             <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrProduct.name|escape}-->" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->" /><br /> 
     443                            <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->" /><br /> 
    444444                            <!--{if $arrProduct[$lkey]|strlen >= 1}--> 
    445                                 <img src="<!--{$TPL_DIR}-->img/products/b_expansion.gif" width="85" height="13" alt="画像を拡大する" id="expansion_<!--{$lkey|escape}-->" /> 
     445                                <img src="<!--{$TPL_DIR}-->img/products/b_expansion.gif" width="85" height="13" alt="画像を拡大する" id="expansion_<!--{$lkey|h}-->" /> 
    446446                            <!--{/if}--> 
    447447                        </a> 
     
    466466                <div class="whoboughtleft"> 
    467467 
    468                     <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|escape:url}-->"> 
    469                         <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrRecommend[cnt].main_list_image|sfNoImageMainList|escape}-->&amp;width=65&amp;height=65" alt="<!--{$arrRecommend[cnt].name|escape}-->" /></a> 
     468                    <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|u}-->"> 
     469                        <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrRecommend[cnt].main_list_image|sfNoImageMainList|h}-->&amp;width=65&amp;height=65" alt="<!--{$arrRecommend[cnt].name|h}-->" /></a> 
    470470 
    471471                    <div class="whoboughtrightblock"> 
    472472                        <!--{assign var=price02_min value=`$arrRecommend[cnt].price02_min`}--> 
    473473                        <!--{assign var=price02_max value=`$arrRecommend[cnt].price02_max`}--> 
    474                         <h3><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|escape:url}-->"><!--{$arrRecommend[cnt].name|escape}--></a></h3> 
     474                        <h3><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|u}-->"><!--{$arrRecommend[cnt].name|h}--></a></h3> 
    475475 
    476476                        <p class="sale_price"><!--{$smarty.const.SALE_PRICE_TITLE}--><span class="mini">(税込)</span>:<span class="price"> 
     
    480480                                <!--{$price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$price02_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 
    481481                            <!--{/if}-->円</span></p> 
    482                         <p class="mini"><!--{$arrRecommend[cnt].comment|escape|nl2br}--></p> 
     482                        <p class="mini"><!--{$arrRecommend[cnt].comment|h|nl2br}--></p> 
    483483                    </div> 
    484484                </div> 
     
    493493                <div class="whoboughtright"> 
    494494 
    495                     <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|escape:url}-->"> 
    496                         <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrRecommend[cnt].main_list_image|sfNoImageMainList|escape}-->&amp;width=65&amp;height=65" alt="<!--{$arrRecommend[cnt].name|escape}-->" /></a> 
     495                    <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|u}-->"> 
     496                        <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrRecommend[cnt].main_list_image|sfNoImageMainList|h}-->&amp;width=65&amp;height=65" alt="<!--{$arrRecommend[cnt].name|h}-->" /></a> 
    497497 
    498498                    <div class="whoboughtrightblock"> 
    499499                        <!--{assign var=price02_min value=`$arrRecommend[cnt].price02_min`}--> 
    500500                        <!--{assign var=price02_max value=`$arrRecommend[cnt].price02_max`}--> 
    501                         <h3><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|escape:url}-->"><!--{$arrRecommend[cnt].name|escape}--></a></h3> 
     501                        <h3><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrRecommend[cnt].product_id|u}-->"><!--{$arrRecommend[cnt].name|h}--></a></h3> 
    502502 
    503503                        <p class="sale_price"><!--{$smarty.const.SALE_PRICE_TITLE}--><span class="mini">(税込)</span>:<span class="price"> 
     
    508508                                <!--{$price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$price02_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 
    509509                            <!--{/if}-->円</span></p> 
    510                         <p class="mini"><!--{$arrRecommend[cnt].comment|escape|nl2br}--></p> 
     510                        <p class="mini"><!--{$arrRecommend[cnt].comment|h|nl2br}--></p> 
    511511                    </div> 
    512512                </div> 
Note: See TracChangeset for help on using the changeset viewer.