can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[js] r293: LJSUP-11828: Cannot upload pics using Ne...

Committer: dpetrov
LJSUP-11828: Cannot upload pics using New PhotoHosting
U   trunk/template.js
Modified: trunk/template.js
===================================================================
--- trunk/template.js	2012-02-08 16:57:30 UTC (rev 292)
+++ trunk/template.js	2012-04-16 09:06:54 UTC (rev 293)
@@ -63,8 +63,9 @@
             start = source.indexOf( this.beginToken, end );
             if( start < 0 )
                 start = source.length;
+            //we remove json.js dependency
             if( start > end )
-                statements.push( "context.write( ", source.substring( end, start ).toJSON(), " );" );
+                statements.push( 'context.write( ', '"' + source.substring( end, start ).escapeJS() + '"', ' );' );
             start += this.beginToken.length;
             
             // code

Tags: can3p, dpetrov, js
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments