Changeset 2486
- Timestamp:
- 06/02/08 19:24:51 (21 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-39/default_templates/javascript.mtml
r2397 r2486 84 84 var str; 85 85 if (delta < 60) { 86 str = '<__trans phrase="moments ago" >';86 str = '<__trans phrase="moments ago" escape="js">'; 87 87 } else if (delta <= 86400) { 88 88 // less than 1 day … … 90 90 var min = Math.floor((delta % 3600) / 60); 91 91 if (hours == 1) 92 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="1" >';92 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="1" escape="js">'; 93 93 else if (hours > 1) 94 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="2" >'.replace(/2/, hours);94 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="2" escape="js">'.replace(/2/, hours); 95 95 else if (min == 1) 96 str = '<__trans phrase="[quant,_1,minute,minutes] ago" params="1" >';96 str = '<__trans phrase="[quant,_1,minute,minutes] ago" params="1" escape="js">'; 97 97 else 98 str = '<__trans phrase="[quant,_1,minute,minutes] ago" params="2" >'.replace(/2/, min);98 str = '<__trans phrase="[quant,_1,minute,minutes] ago" params="2" escape="js">'.replace(/2/, min); 99 99 } else if (delta <= 604800) { 100 100 // less than 1 week … … 102 102 var hours = Math.floor((delta % 86400) / 3600); 103 103 if (days == 1) 104 str = '<__trans phrase="[quant,_1,day,days] ago" params="1" >';104 str = '<__trans phrase="[quant,_1,day,days] ago" params="1" escape="js">'; 105 105 else if (days > 1) 106 str = '<__trans phrase="[quant,_1,day,days] ago" params="2" >'.replace(/2/, days);106 str = '<__trans phrase="[quant,_1,day,days] ago" params="2" escape="js">'.replace(/2/, days); 107 107 else if (hours == 1) 108 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="1" >';108 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="1" escape="js">'; 109 109 else 110 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="2" >'.replace(/2/, hours);110 str = '<__trans phrase="[quant,_1,hour,hours] ago" params="2" escape="js">'.replace(/2/, hours); 111 111 } 112 112 return str ? str : fds; … … 124 124 if (! author_id) return; 125 125 if (u.id != author_id) return; 126 var link = '<__trans phrase='<a href="[_1]">Edit</a>' params="<$mt:AdminScript$>?__mode=view&_type=entry&id=' + entry_id + '" >';126 var link = '<__trans phrase='<a href="[_1]">Edit</a>' params="<$mt:AdminScript$>?__mode=view&_type=entry&id=' + entry_id + '" escape="js">'; 127 127 document.write(link); 128 128 } … … 477 477 } 478 478 if (el) 479 el.innerHTML = '<__trans phrase="Signing in..." > <img src="<$mt:StaticWebPath$>images/indicator.white.gif" height="16" width="16" alt="" />';479 el.innerHTML = '<__trans phrase="Signing in..." escape="js"> <img src="<$mt:StaticWebPath$>images/indicator.white.gif" height="16" width="16" alt="" />'; 480 480 481 481 mtClearUser(); // clear any 'anonymous' user cookie to allow sign in … … 555 555 if ( u && u.is_authenticated ) { 556 556 if ( u.is_banned ) { 557 phrase = '<__trans phrase="You do not have permission to comment on this blog. ([_1]sign out[_2])" params="<a href="javascript:void(0);" onclick="return mtSignOutOnClick();">%%</a>" >';557 phrase = '<__trans phrase="You do not have permission to comment on this blog. ([_1]sign out[_2])" params="<a href="javascript:void(0);" onclick="return mtSignOutOnClick();">%%</a>" escape="js">'; 558 558 } else { 559 559 var user_link; … … 571 571 } 572 572 // TBD: supplement phrase with userpic if one is available. 573 phrase = '<__trans phrase="Thanks for signing in, [_1]. ([_2]sign out[_3])" params="' + user_link + '%%<a href="javascript:void(0)" onclick="return mtSignOutOnClick();">%%</a>" >';573 phrase = '<__trans phrase="Thanks for signing in, [_1]. ([_2]sign out[_3])" params="' + user_link + '%%<a href="javascript:void(0)" onclick="return mtSignOutOnClick();">%%</a>" escape="js">'; 574 574 } 575 575 } else { 576 576 if (reg_reqd) { 577 phrase = '<__trans phrase="[_1]Sign in[_2] to comment." params="<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'comment-greeting\')">%%</a>" >';577 phrase = '<__trans phrase="[_1]Sign in[_2] to comment." params="<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'comment-greeting\')">%%</a>" escape="js">'; 578 578 } else { 579 phrase = '<__trans phrase="[_1]Sign in[_2] to comment, or comment anonymously." params="<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'comment-greeting\')">%%</a>" >';579 phrase = '<__trans phrase="[_1]Sign in[_2] to comment, or comment anonymously." params="<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'comment-greeting\')">%%</a>" escape="js">'; 580 580 } 581 581 } … … 599 599 600 600 // Populate label with new values 601 var reply_text = '<__trans phrase="Replying to <a href="[_1]" onclick="[_2]">comment from [_3]</a>" params="#comment-'+ parent_id +'%%location.href=this.href; return false%%'+ author +'" >';601 var reply_text = '<__trans phrase="Replying to <a href="[_1]" onclick="[_2]">comment from [_3]</a>" params="#comment-'+ parent_id +'%%location.href=this.href; return false%%'+ author +'" escape="js">'; 602 602 label.innerHTML = reply_text; 603 603
