This repository was archived by the owner on Sep 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 140140 data
141141 )
142142 ) . to . be (
143- ''
143+ '00 '
144144 ) ;
145145 } ) ;
146146
154154 data
155155 )
156156 ) . to . be (
157- ''
157+ '00 '
158158 ) ;
159159 } ) ;
160160
Original file line number Diff line number Diff line change 2222 tmpl ( tmpl . load ( str ) ) :
2323 new Function (
2424 tmpl . arg + ',tmpl' ,
25- "var _e=tmpl.encode" + tmpl . helper + ",_s='" +
25+ "var _e=tmpl.encode" + tmpl . helper + ",_r=tmpl.raw" + tmpl . helper + ", _s='" +
2626 str . replace ( tmpl . regexp , tmpl . func ) +
2727 "';return _s;"
2828 ) ;
4848 if ( p2 === "=" ) {
4949 return "'+_e(" + p3 + ")+'" ;
5050 }
51- return "'+(" + p3 + "||'' )+'" ;
51+ return "'+_r (" + p3 + ")+'" ;
5252 }
5353 if ( p4 ) { // evaluation start tag: {%
5454 return "';" ;
6666 "'" : "'"
6767 } ;
6868 tmpl . encode = function ( s ) {
69- return String ( s || "" ) . replace (
69+ return String ( ( s === 0 ) ? '0' : ( s || "" ) ) . replace (
7070 tmpl . encReg ,
7171 function ( c ) {
7272 return tmpl . encMap [ c ] || "" ;
7373 }
7474 ) ;
7575 } ;
76+ tmpl . raw = function ( s ) {
77+ return String ( ( s === 0 ) ? '0' : ( s || "" ) ) ;
78+ } ;
7679 tmpl . arg = "o" ;
7780 tmpl . helper = ",print=function(s,e){_s+=e&&(s||'')||_e(s);}" +
7881 ",include=function(s,d){_s+=tmpl(s,d);}" ;
You can’t perform that action at this time.
0 commit comments