Changeset 12428


Ignore:
Timestamp:
10/13/11 20:03:53 (7 years ago)
Author:
rvelices
Message:

bug 2469 (merge from trunk) compiled_template_cache_language option does not work properly on some language keys because of double escaping

Location:
branches/2.3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/admin/themes/default/template/install.tpl

    r12103 r12428  
    281281<label> 
    282282<input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}> 
    283 <span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|htmlspecialchars|nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span> 
     283<span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span> 
    284284</label> 
    285285<br> 
  • branches/2.3/admin/themes/default/template/intro.tpl

    r11839 r12428  
    22 
    33{footer_script require='jquery.cluetip'} 
    4 var piwigo_need_update_msg = '<a href="admin.php?page=updates">{"A new version of Piwigo is available."|@translate|@escape:"javascript"}</a>'; 
    5 var ext_need_update_msg = '<a href="admin.php?page=updates&amp;tab=ext">{"Some upgrades are available for extensions."|@translate|@escape:"javascript"}</a>'; 
     4var piwigo_need_update_msg = '<a href="admin.php?page=updates">{'A new version of Piwigo is available.'|@translate|@escape:"javascript"}</a>'; 
     5var ext_need_update_msg = '<a href="admin.php?page=updates&amp;tab=ext">{'Some upgrades are available for extensions.'|@translate|@escape:"javascript"}</a>'; 
    66 
    77{literal} 
     
    4343      <li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li> 
    4444{if isset($SUBSCRIBE_BASE_URL)} 
    45       <li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|htmlspecialchars|nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</a></li> 
     45      <li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</a></li> 
    4646{/if} 
    4747    </ul> 
  • branches/2.3/admin/themes/default/template/languages_new.tpl

    r9553 r12428  
    2727{foreach from=$languages item=language name=languages_loop} 
    2828  <tr class="{if $smarty.foreach.languages_loop.index is odd}row1{else}row2{/if}"> 
    29     <td><a href="{$language.EXT_URL}" class="externalLink cluetip" title="{$language.EXT_NAME}|{$language.EXT_DESC|htmlspecialchars|nl2br}">{$language.EXT_NAME}</a></td> 
    30     <td style="text-align:center;"><a href="{$language.EXT_URL}" class="externalLink cluetip" title="{$language.EXT_NAME}|{$language.VER_DESC|htmlspecialchars|nl2br}">{$language.VERSION}</a></td> 
     29    <td><a href="{$language.EXT_URL}" class="externalLink cluetip" title="{$language.EXT_NAME}|{$language.EXT_DESC|@htmlspecialchars|@nl2br}">{$language.EXT_NAME}</a></td> 
     30    <td style="text-align:center;"><a href="{$language.EXT_URL}" class="externalLink cluetip" title="{$language.EXT_NAME}|{$language.VER_DESC|@htmlspecialchars|@nl2br}">{$language.VERSION}</a></td> 
    3131    <td>{$language.DATE}</td> 
    3232    <td>{$language.AUTHOR}</td> 
  • branches/2.3/admin/themes/default/template/menubar.tpl

    r9586 r12428  
    2727 
    2828<div class="titrePage"> 
    29   <h2>{'Menu Management'|translate}</h2> 
     29  <h2>{'Menu Management'|@translate}</h2> 
    3030</div> 
    3131 
  • branches/2.3/admin/themes/default/template/updates_ext.tpl

    r10596 r12428  
    187187      <td></td> 
    188188      <td class="pluginDesc"> 
    189         <p id="revdesc_{$plugin.ID}" style="display:none;">{$plugin.REV_DESC|htmlspecialchars|nl2br}</p> 
     189        <p id="revdesc_{$plugin.ID}" style="display:none;">{$plugin.REV_DESC|@htmlspecialchars|@nl2br}</p> 
    190190      </td> 
    191191    </tr> 
     
    229229      <td></td> 
    230230      <td class="pluginDesc"> 
    231         <p id="revdesc_{$theme.ID}" style="display:none;">{$theme.REV_DESC|htmlspecialchars|nl2br}</p> 
     231        <p id="revdesc_{$theme.ID}" style="display:none;">{$theme.REV_DESC|@htmlspecialchars|@nl2br}</p> 
    232232      </td> 
    233233    </tr> 
     
    271271      <td></td> 
    272272      <td class="pluginDesc"> 
    273         <p id="revdesc_{$language.ID}" style="display:none;">{$language.REV_DESC|htmlspecialchars|nl2br}</p> 
     273        <p id="revdesc_{$language.ID}" style="display:none;">{$language.REV_DESC|@htmlspecialchars|@nl2br}</p> 
    274274      </td> 
    275275    </tr> 
  • branches/2.3/include/template.class.php

    r11753 r12428  
    767767 
    768768    $regex = "~$ldq *\'([^'$]+)\'\|@translate *$rdq~"; 
    769     $source = preg_replace( $regex.'e', 'isset($lang[\'$1\']) ? $lang[\'$1\'] : \'$0\'', $source); 
     769    $source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? $lang[$m[1]] : $m[0];'), $source); 
    770770 
    771771    $regex = "~$ldq *\'([^'$]+)\'\|@translate\|~"; 
    772     $source = preg_replace( $regex.'e', 'isset($lang[\'$1\']) ? \'{\'.var_export($lang[\'$1\'],true).\'|\' : \'$0\'', $source); 
     772    $source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? \'{\'.var_export($lang[$m[1]],true).\'|\' : \'$m[0]\';'), $source); 
    773773 
    774774    $regex = "~($ldq *assign +var=.+ +value=)\'([^'$]+)\'\|@translate~e"; 
    775     $source = preg_replace( $regex, 'isset($lang[\'$2\']) ? \'$1\'.var_export($lang[\'$2\'],true) : \'$0\'', $source); 
     775    $source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[2]]) ? $m[1].var_export($lang[$m[2]],true) : \'$m[0]\';'), $source); 
    776776 
    777777    return $source; 
Note: See TracChangeset for help on using the changeset viewer.