Title: Error in javascript function pakjegemak()
Last modified: August 22, 2016

---

# Error in javascript function pakjegemak()

 *  Resolved [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * (@dewebbouwmeester)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-in-javascript-function-pakjegemak/)
 * Hello all,
 * In version 1.4.4 javascript function pakjegemak() contains a blank line, line
   251 in wcmyparcel-writepanel.php. This results in an paragraph end tag </p> in
   the script as it is rendered on the page, most likely because of wpautop.
    This
   html tag in the script causes an error. Removing the blank line solves this issue.
 * Kind regards,
    Peter
 * [https://wordpress.org/plugins/woocommerce-myparcel/](https://wordpress.org/plugins/woocommerce-myparcel/)

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

 *  [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-in-javascript-function-pakjegemak/#post-5562808)
 * Thanks for reporting! I will remove the blank line in the next update. It’s very
   odd that a paragraph end tag is added – it doesn’t happen in my own install, 
   nor have I received any reports from other users. Is it possible that your theme
   is doing this autop ? Blank lines are perfectly legal to use in js!
 *  [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-in-javascript-function-pakjegemak/#post-5562809)
 * Actually, wpautop has built in functionality that should prevent this to happen
   in the first place:
    [https://developer.wordpress.org/reference/functions/wpautop/](https://developer.wordpress.org/reference/functions/wpautop/)
 *     ```
       if ( $br ) {
       	$pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee);
       	$pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks
       	$pee = str_replace('<WPPreserveNewline />', "\n", $pee);
       }
       ```
   
 * So my guess is that it’s not core WordPress doing this…
 * Ewout
 *  Thread Starter [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * (@dewebbouwmeester)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-in-javascript-function-pakjegemak/#post-5562811)
 * Hi Ewout,
    Thanks for your quick reply! The plugin is part of quite a large (
   multisite) installation and there could very well be some other code interfering.
   I will try if i can find the culprit and let you know. I’ll mark this issue as
   resolved, thanks. Kind regards, Peter
 *  Thread Starter [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * (@dewebbouwmeester)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-in-javascript-function-pakjegemak/#post-5562825)
 * Hi Ewout,
    Thanks for pointing me at default wpautop formatting. It made me look
   at the code base and I indeed found a bespoke function that tempers with the 
   content filters in such a way, that it causes the erroneous paragraph tags. I
   need to find a way to solve that. As it turns out, this also seems to cause the
   [other issue](https://wordpress.org/support/topic/cannot-confirm-pick-up-location-in-pop-up-window/)
   i reported, although I don’t quite understand why yet. Kind regards, Peter

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

The topic ‘Error in javascript function pakjegemak()’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-myparcel/assets/icon-256x256.png?rev=2898538)
 * [MyParcel](https://wordpress.org/plugins/woocommerce-myparcel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-myparcel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-myparcel/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-myparcel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-myparcel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-myparcel/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/error-in-javascript-function-pakjegemak/#post-5562825)
 * Status: resolved