Title: Python in code block preventing post saving
Last modified: December 5, 2024

---

# Python in code block preventing post saving

 *  Resolved [Kyle Nel](https://wordpress.org/support/users/devnel/)
 * (@devnel)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/)
 * Hi! I noticed that when I write a post that contains certain types of Python 
   code in a code block, or inline code, that the post won’t save while Jetpack 
   Protect is active.
 * The specific error is:
 * > rule 932160 – reason Remote Command Execution: Unix Shell Code Found
 * This makes sense, but since the code is intentionally included inside a code 
   syntax highlight block as part of the post content, I’d like to find a way around
   this.
 * Do you have any suggestions?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpython-in-code-block-preventing-post-saving%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18180174)
 * Hi there, [@devnel](https://wordpress.org/support/users/devnel/),
 * Thanks for raising this interesting question. I checked our internal documentation
   and I didn’t find anything useful to answer it, so I have asked our tech team
   to take a look at it.
 * We’ll circle back as soon as we have updates! Thanks for bearing with us meanwhile
   🙂 
   _(for internal ref: GH issue 9386)_
 *  Thread Starter [Kyle Nel](https://wordpress.org/support/users/devnel/)
 * (@devnel)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18180198)
 * Thanks Stef! Appreciate whatever help you can offer. If you need anything from
   me, please do let me know 🙂
 *  Plugin Support [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18180211)
 * Hey [@devnel](https://wordpress.org/support/users/devnel/),
 * Thanks a lot for your offer, that’s well noted!
 * We’ll get back with questions or reports as soon as possible. Take care meanwhile!
 *  Plugin Support [Animesh Gaurav (a11n)](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18181522)
 * 👋 Hey [@devnel](https://wordpress.org/support/users/devnel/), we are checking
   your issue.
 * Could you please share example of Python code which when used with a code block
   or inline code, doesn’t save the post while Jetpack Protect is active?
 *  Thread Starter [Kyle Nel](https://wordpress.org/support/users/devnel/)
 * (@devnel)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18181597)
 * Hey Animesh. Hopefully I can send it here! 😅
 * this is the main offending piece of code:
 *     ```wp-block-code
       #!/usr/bin/env python3
       ```
   
 * It’s a shebang used at the beginning of a python file to indicate the location
   of the python executable. This appears both in a code block alongside a larger
   python code file, as well as an inline code line.
 *  Plugin Support [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18182176)
 * Hey [@devnel](https://wordpress.org/support/users/devnel/),
 * That’s brilliant, thanks so much! I have passed it on to our tech team for investigation.
   We’ll circle back as soon as we hear from them 🙂
 *  Plugin Support [Animesh Gaurav (a11n)](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18182641)
 * Hey [@devnel](https://wordpress.org/support/users/devnel/) – I tried to reproduce
   the issue but on my side it working fine with Jetpack Protect plugin active. 
   Could you please [check this recording](https://cloudup.com/cJReDES59Qt) and 
   let me know if I’m missing any step?
 * Looking forward to your reply. 🙂
 *  Thread Starter [Kyle Nel](https://wordpress.org/support/users/devnel/)
 * (@devnel)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18186897)
 * Those steps look right! This is a production server with a few other things running
   so perhaps this is an interaction between the extension and my server firewall
   or another plugin. I’ll test a few more things and get back to you if I find 
   anything!
 *  Plugin Support [Paulina H. (a11n)](https://wordpress.org/support/users/pehaa/)
 * (@pehaa)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18194169)
 * Sounds like a plan [@devnel](https://wordpress.org/support/users/devnel/). Please
   keep us updated.
 * Thank you!
 *  Plugin Support [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18210155)
 * Hello [@devnel](https://wordpress.org/support/users/devnel/),
 * Do you have updates about that, do you still need help? We usually close inactive
   threads after one week of no movement, but we want to make sure we’re all set
   before marking it as solved. Thanks!

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

The topic ‘Python in code block preventing post saving’ is closed to new replies.

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

## Tags

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

 * 10 replies
 * 4 participants
 * Last reply from: [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/python-in-code-block-preventing-post-saving/#post-18210155)
 * Status: resolved