Changeset 19575


Ignore:
Timestamp:
Dec 26, 2012, 12:35:40 PM (11 years ago)
Author:
mistic100
Message:

feature 2816: {strip} smarty tag can introduce bugs in javascript + fix picture.tpl

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/smarty/libs/Smarty_Compiler.class.php

    r3584 r19575  
    333333                for ($j = $i + 1; $j < $for_max; $j++) {
    334334                    /* remove leading and trailing whitespaces of each line */
    335                     $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);
     335                    $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', ' ', $text_blocks[$j]);
    336336                    if ($compiled_tags[$j] == '{/strip}') {                       
    337337                        /* remove trailing whitespaces from the last text_block */
  • trunk/themes/default/template/picture.tpl

    r18950 r19575  
    259259                                                e = document.getElementById("ratingCount");
    260260                                                if (e) {ldelim}
    261                                                         if (rating.count == 1)
     261                                                        if (rating.count == 1) {
    262262                                                                e.innerHTML = "({'%d rate'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
    263                                                         else
     263                                                        } else {
    264264                                                                e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
     265              }
    265266                                                {rdelim}
    266267                                        {rdelim}{rdelim} );
Note: See TracChangeset for help on using the changeset viewer.