Title: fixed javascript error with new lines replaced with
Last modified: August 21, 2016

---

# fixed javascript error with new lines replaced with

 *  [snarvaez](https://wordpress.org/support/users/snarvaez/)
 * (@snarvaez)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/fixed-javascript-error-with-new-lines-replaced-with/)
 * Hello,
    to the developers, I just want to give you my 5 cents of how I fixed 
   a problem that was replacing new lines with <p> inside the javascript parts.
 * I installed the plugin on a development server, and it worked perfect.
    When 
   I moved it to production (same wordpress version, same plugins installed), I 
   got a javascript error … I went to debug, and I found that extrangely enough,
   some new lines inside the javascript code that is inside shortcode.php in some
   servers were replaced by <p> inside the javascript, which is not legal javascript
   of course. So, empty lines replaced by <p> …
 * I got something like this:
 * <p><!– Slideshow generated using Fluid-Responsive-Slideshow, [http://www.tonjoo.com/wordpress-plugin-fluid-responsive-slideshow-plugin/](http://www.tonjoo.com/wordpress-plugin-fluid-responsive-slideshow-plugin/)–
   >
    <script> jQuery(document).ready(function($) {</p>
 * I tried dissabling the wpautop hook, to see if it will stop adding those extra
   <p> inside the javascript, but no luck.
    I did not have time to debug what is
   adding those extra <p>, but I simply fixed the problem by removing the extra 
   new lines in the javascript parts inside the file shortcode.php
 * For example, instead of this:
 * jQuery(document).ready(function($) {
 *  jQuery(‘#{$attr[‘slide_type_id’]}’).frs({
 * Now it looks like this inside shortcode.php:
 * jQuery(document).ready(function($) {
    jQuery(‘#{$attr[‘slide_type_id’]}’).frs({
 * Simply removed the extra empty lines in several places through the javascript
   parts.
 * I’m not sure if this is a bug specific to this plugin, but in any case it seems
   it can make it more compatible with other installed plugins and javascript libraries.
 * I can send you the modified shortcode.php file if you want to take a look.
 * I hope this can help someone in the same situation, and I would love to see this
   simple fix added into the repository.
 * Regards,
    Seba.
 * [https://wordpress.org/plugins/fluid-responsive-slideshow/](https://wordpress.org/plugins/fluid-responsive-slideshow/)

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

 *  Plugin Contributor [Haris](https://wordpress.org/support/users/haristonjoo/)
 * (@haristonjoo)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/fixed-javascript-error-with-new-lines-replaced-with/#post-5148899)
 * Hi!,
 * Thank You!, we have update the plugin to version 1.0.5 to fix that issue by your
   solution, thanks again 🙂
 * regards
 *  [wcmanuel](https://wordpress.org/support/users/wcmanuel/)
 * (@wcmanuel)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/fixed-javascript-error-with-new-lines-replaced-with/#post-5148992)
 * Hi [@haris](https://wordpress.org/support/users/haris/),
 * I have the same problem, it just hangs without going anywhere 🙁
 * When I click on Create a First Slide all I get is a light grey screen and it’s
   frozen?
 *  Plugin Contributor [Haris](https://wordpress.org/support/users/haristonjoo/)
 * (@haristonjoo)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/fixed-javascript-error-with-new-lines-replaced-with/#post-5148993)
 * Hi, i just have updated the plugin, please check.
    If there any error, please
   let me know.

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

The topic ‘fixed javascript error with new lines replaced with’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/fluid-responsive-slideshow_4c8178.
   svg)
 * [Fluid Responsive Slideshow](https://wordpress.org/plugins/fluid-responsive-slideshow/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fluid-responsive-slideshow/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fluid-responsive-slideshow/)
 * [Active Topics](https://wordpress.org/support/plugin/fluid-responsive-slideshow/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fluid-responsive-slideshow/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fluid-responsive-slideshow/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Haris](https://wordpress.org/support/users/haristonjoo/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/fixed-javascript-error-with-new-lines-replaced-with/#post-5148993)
 * Status: not resolved