Title: Non JSON content breaks JavaScript resulting in syntax error
Last modified: August 31, 2016

---

# Non JSON content breaks JavaScript resulting in syntax error

 *  Resolved [willhans](https://wordpress.org/support/users/willhans/)
 * (@willhans)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/)
 * On my web-based application, it adds a tag to the calculation pages:
    <!– Really
   Simple SSL mixed content fixer active –> This is not JSON content and therefore
   breaks the JavaScript resulting in the error: SyntaxError: JSON Parse error: 
   Unrecognized token ‘<‘ Is it possible to remove this TAG? When plugin is disabled,
   there is no problem. To see the error yourself. Please go to [http://www.tophand.co.uk/join-us](http://www.tophand.co.uk/join-us).
   Please use one of the free options to login and you’ll see the web based application.
   Enter 100 for Bet, 8 for Price and 5 for New price. Hit calculate and you’ll 
   see the error. Please could you assist? Thanks.
 * [https://wordpress.org/plugins/really-simple-ssl/](https://wordpress.org/plugins/really-simple-ssl/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977627)
 * In the next update a filter will added for this purpose. For now, in the class-
   frontend.php, search for the comment, and comment it out.
 *  Thread Starter [willhans](https://wordpress.org/support/users/willhans/)
 * (@willhans)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977639)
 * I commented this out
 *     ```
       $buffer = "<!-- Really Simple SSL mixed content fixer active -->".$buffer;
   
           return $buffer;
         }
       ```
   
 * But then website doesn’t load, it seems to have other implications. Is there 
   anything else I need to do?
    Thanks.
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977642)
 * Change:
 *     ```
       $buffer = "<!-- Really Simple SSL mixed content fixer active -->".$buffer;
       return $buffer;
       ```
   
 * Into
 *     ```
       //$buffer = "<!-- Really Simple SSL mixed content fixer active -->".$buffer;
       return $buffer;
       ```
   
 * The buffer should be returned.
 *  Thread Starter [willhans](https://wordpress.org/support/users/willhans/)
 * (@willhans)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977644)
 * That buffer return was missing, all is working. Thanks very much.
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977660)
 * If you want to remove this comment is a way compatible with future updates, I’ve
   added an instruction how to do this with the filter I’ll be adding. That way,
   you won’t have to do anything on the next update:
    [https://really-simple-ssl.com/knowledge-base/removing-mixed-content-fixer-comment-from-html-source/](https://really-simple-ssl.com/knowledge-base/removing-mixed-content-fixer-comment-from-html-source/)
 *  Thread Starter [willhans](https://wordpress.org/support/users/willhans/)
 * (@willhans)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977661)
 * Thanks. I tried this suggestion but my website didn’t load. I will go back to
   the tactical fix to comment out buffer for now.
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977672)
 * You are right, there was an error in the code. I’ve updated it, it’s the tested
   code now.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Non JSON content breaks JavaScript resulting in syntax error’ is closed
to new replies.

 * ![](https://ps.w.org/really-simple-ssl/assets/icon-256x256.png?rev=2839720)
 * [Really Simple Security - Simple and Performant Security (formerly Really Simple SSL)](https://wordpress.org/plugins/really-simple-ssl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-ssl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-ssl/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-ssl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-ssl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-ssl/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [json](https://wordpress.org/support/topic-tag/json/)

 * 7 replies
 * 2 participants
 * Last reply from: [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/non-json-content-breaks-javascript-resulting-in-syntax-error/#post-6977672)
 * Status: resolved