Script tags removed from PHP Snippet
-
Hi,
Thanks for the great plugin.In my PHP Snippet, I use ‘<script>’ tags for output, but these tags get stripped away after the first successful execution of the snippet.
Here is the code before execution:
// ... $response = wp_remote_post( 'https://example.com/my_api', $args ); $json_in_body_data = wp_remote_retrieve_body($response); return '<script>var examplevariable = '. $json_in_body_data . ';</script>';
After the first (successful) execution, the code snippet gets modified automatically to:
// ... $response = wp_remote_post( 'https://example.com/my_api', $args ); $json_in_body_data = wp_remote_retrieve_body($response); return 'var examplevariable = '. $json_in_body_data . ';';
Note the
<script>
tags being removed.The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Script tags removed from PHP Snippet’ is closed to new replies.