Title: Invalid Action Network Embed Code again
Last modified: April 17, 2026

---

# Invalid Action Network Embed Code again

 *  [Jeremy Malcolm](https://wordpress.org/support/users/jeremy-malcolm/)
 * (@jeremy-malcolm)
 * [1 month, 3 weeks ago](https://wordpress.org/support/topic/invalid-action-network-embed-code-again/)
 * On lines 1161 and 1297 of actionnetwork.php, the plugin is only validating embed
   codes versions 2-4. Action Network is currently on version 6, so the regex needs
   updating.
 * Additionally, the embed is failing validation because you’re running `wp_kses_post()`
   on the embed code before applying the regex. That sanitization alters the `<script
   >` tag or query string, so the regex never matches. The raw `wp_unslash()` value
   needs to be used for parsing/validation.
 * These two issues lead to an “invalid embed code” error.
    -  This topic was modified 1 month, 3 weeks ago by [Jeremy Malcolm](https://wordpress.org/support/users/jeremy-malcolm/).
      Reason: Added another related bug

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

 *  Plugin Author [Concerted Action](https://wordpress.org/support/users/concertedaction/)
 * (@concertedaction)
 * [1 month, 3 weeks ago](https://wordpress.org/support/topic/invalid-action-network-embed-code-again/#post-18883718)
 * Thanks for this report. We’ve just pushed a fix. Let me know if this resolves
   your issue?
 *  Thread Starter [Jeremy Malcolm](https://wordpress.org/support/users/jeremy-malcolm/)
 * (@jeremy-malcolm)
 * [1 month, 2 weeks ago](https://wordpress.org/support/topic/invalid-action-network-embed-code-again/#post-18884593)
 * Yes thanks, though you may also want to fix another issue where the Date field
   on the Add action screen is malformed due to another misuse of `wp_kses_post()`
   in `echo wp_kses_post( actionnetwork_build_time_input(…) );`. If you take a look
   at the form you’ll see what I mean, you can’t miss it. It is outputting raw sanitized
   HTML and Javascript instead of form fields.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-action-network-embed-code-again%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

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

 * 2 replies
 * 2 participants
 * Last reply from: [Jeremy Malcolm](https://wordpress.org/support/users/jeremy-malcolm/)
 * Last activity: [1 month, 2 weeks ago](https://wordpress.org/support/topic/invalid-action-network-embed-code-again/#post-18884593)
 * Status: not resolved