Wordpress post editor crashes with Polyfill typo





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















When trying to edit a wordpress post (page) the editor loads indefinitely, console shows JS error with post.php / polyfill, see code below. To me it seems to be a typo and I have no idea where the line is injected so I could change it manually.



Disabling all plugins did not change anything, neither did disabling Gutenberg. I am not much of a coder, nevertheless it seems to me there should not be a double quotation mark after the last 'defer"... in the line of code.



I am running WP 5.0.2 on Apache (Domainfactory) in a managed server environment, Theme is Enfold by Kriesi. Re-installing Wordpress and the theme (copied from working installations) changed nothing so far.



The reported error in the console is
"Uncaught SyntaxError: missing ) after argument list"
in
https://.../wp-admin/post.php?post=23&action=edit&lang=de&classic-editor=1:238



There it says



( 'fetch' in window ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0' defer='defer"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.26.0-0' defer='defer"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12' defer='defer"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2' defer='defer"></scr' + 'ipt>' );


Any idea would be much appreciated.










share|improve this question















migrated from stackoverflow.com Jan 4 at 15:43


This question came from our site for professional and enthusiast programmers.



















  • ask at: s.tk/wp

    – T.Todua
    Jan 4 at 15:12











  • I am sorry. What does that mean?

    – Amanahumpa
    Jan 4 at 15:14











  • Thank you for editing and prividing a real resource. Your link sends me to the WP Core bug tracker and there it says it has to be a WP core bug, which is unsure. Moreover I can not wait for the next wordpress update to edit the existing pages I hope to get direction and inspiration here. To file a ticket is another step in the process. Please allow me to get help here.

    – Amanahumpa
    Jan 4 at 15:34











  • Did you try changing themes? Not just disabling plugins but also changing the theme? If that solves the issue, then you know it's the theme.

    – disinfor
    Jan 4 at 15:37











  • Yes, I did. When using a standard theme and standard editor it works but is of no use since it depends on the integrated page builder ('advanced layout editor'). Dev of the theme has no reports on that so far. I am using the exact same combo of WP / theme / Hoster on other projects. No probs there... :-/ My hope is a workaround until the dev teams can react to that.

    – Amanahumpa
    Jan 4 at 15:46


















0















When trying to edit a wordpress post (page) the editor loads indefinitely, console shows JS error with post.php / polyfill, see code below. To me it seems to be a typo and I have no idea where the line is injected so I could change it manually.



Disabling all plugins did not change anything, neither did disabling Gutenberg. I am not much of a coder, nevertheless it seems to me there should not be a double quotation mark after the last 'defer"... in the line of code.



I am running WP 5.0.2 on Apache (Domainfactory) in a managed server environment, Theme is Enfold by Kriesi. Re-installing Wordpress and the theme (copied from working installations) changed nothing so far.



The reported error in the console is
"Uncaught SyntaxError: missing ) after argument list"
in
https://.../wp-admin/post.php?post=23&action=edit&lang=de&classic-editor=1:238



There it says



( 'fetch' in window ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0' defer='defer"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.26.0-0' defer='defer"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12' defer='defer"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2' defer='defer"></scr' + 'ipt>' );


Any idea would be much appreciated.










share|improve this question















migrated from stackoverflow.com Jan 4 at 15:43


This question came from our site for professional and enthusiast programmers.



















  • ask at: s.tk/wp

    – T.Todua
    Jan 4 at 15:12











  • I am sorry. What does that mean?

    – Amanahumpa
    Jan 4 at 15:14











  • Thank you for editing and prividing a real resource. Your link sends me to the WP Core bug tracker and there it says it has to be a WP core bug, which is unsure. Moreover I can not wait for the next wordpress update to edit the existing pages I hope to get direction and inspiration here. To file a ticket is another step in the process. Please allow me to get help here.

    – Amanahumpa
    Jan 4 at 15:34











  • Did you try changing themes? Not just disabling plugins but also changing the theme? If that solves the issue, then you know it's the theme.

    – disinfor
    Jan 4 at 15:37











  • Yes, I did. When using a standard theme and standard editor it works but is of no use since it depends on the integrated page builder ('advanced layout editor'). Dev of the theme has no reports on that so far. I am using the exact same combo of WP / theme / Hoster on other projects. No probs there... :-/ My hope is a workaround until the dev teams can react to that.

    – Amanahumpa
    Jan 4 at 15:46














0












0








0








When trying to edit a wordpress post (page) the editor loads indefinitely, console shows JS error with post.php / polyfill, see code below. To me it seems to be a typo and I have no idea where the line is injected so I could change it manually.



Disabling all plugins did not change anything, neither did disabling Gutenberg. I am not much of a coder, nevertheless it seems to me there should not be a double quotation mark after the last 'defer"... in the line of code.



I am running WP 5.0.2 on Apache (Domainfactory) in a managed server environment, Theme is Enfold by Kriesi. Re-installing Wordpress and the theme (copied from working installations) changed nothing so far.



The reported error in the console is
"Uncaught SyntaxError: missing ) after argument list"
in
https://.../wp-admin/post.php?post=23&action=edit&lang=de&classic-editor=1:238



There it says



( 'fetch' in window ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0' defer='defer"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.26.0-0' defer='defer"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12' defer='defer"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2' defer='defer"></scr' + 'ipt>' );


Any idea would be much appreciated.










share|improve this question
















When trying to edit a wordpress post (page) the editor loads indefinitely, console shows JS error with post.php / polyfill, see code below. To me it seems to be a typo and I have no idea where the line is injected so I could change it manually.



Disabling all plugins did not change anything, neither did disabling Gutenberg. I am not much of a coder, nevertheless it seems to me there should not be a double quotation mark after the last 'defer"... in the line of code.



I am running WP 5.0.2 on Apache (Domainfactory) in a managed server environment, Theme is Enfold by Kriesi. Re-installing Wordpress and the theme (copied from working installations) changed nothing so far.



The reported error in the console is
"Uncaught SyntaxError: missing ) after argument list"
in
https://.../wp-admin/post.php?post=23&action=edit&lang=de&classic-editor=1:238



There it says



( 'fetch' in window ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0' defer='defer"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.26.0-0' defer='defer"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12' defer='defer"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://12345678-123.ch/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2' defer='defer"></scr' + 'ipt>' );


Any idea would be much appreciated.







editor






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 5 at 8:27









fuxia

93.3k13186367




93.3k13186367










asked Jan 4 at 15:01









AmanahumpaAmanahumpa

34




34




migrated from stackoverflow.com Jan 4 at 15:43


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Jan 4 at 15:43


This question came from our site for professional and enthusiast programmers.















  • ask at: s.tk/wp

    – T.Todua
    Jan 4 at 15:12











  • I am sorry. What does that mean?

    – Amanahumpa
    Jan 4 at 15:14











  • Thank you for editing and prividing a real resource. Your link sends me to the WP Core bug tracker and there it says it has to be a WP core bug, which is unsure. Moreover I can not wait for the next wordpress update to edit the existing pages I hope to get direction and inspiration here. To file a ticket is another step in the process. Please allow me to get help here.

    – Amanahumpa
    Jan 4 at 15:34











  • Did you try changing themes? Not just disabling plugins but also changing the theme? If that solves the issue, then you know it's the theme.

    – disinfor
    Jan 4 at 15:37











  • Yes, I did. When using a standard theme and standard editor it works but is of no use since it depends on the integrated page builder ('advanced layout editor'). Dev of the theme has no reports on that so far. I am using the exact same combo of WP / theme / Hoster on other projects. No probs there... :-/ My hope is a workaround until the dev teams can react to that.

    – Amanahumpa
    Jan 4 at 15:46



















  • ask at: s.tk/wp

    – T.Todua
    Jan 4 at 15:12











  • I am sorry. What does that mean?

    – Amanahumpa
    Jan 4 at 15:14











  • Thank you for editing and prividing a real resource. Your link sends me to the WP Core bug tracker and there it says it has to be a WP core bug, which is unsure. Moreover I can not wait for the next wordpress update to edit the existing pages I hope to get direction and inspiration here. To file a ticket is another step in the process. Please allow me to get help here.

    – Amanahumpa
    Jan 4 at 15:34











  • Did you try changing themes? Not just disabling plugins but also changing the theme? If that solves the issue, then you know it's the theme.

    – disinfor
    Jan 4 at 15:37











  • Yes, I did. When using a standard theme and standard editor it works but is of no use since it depends on the integrated page builder ('advanced layout editor'). Dev of the theme has no reports on that so far. I am using the exact same combo of WP / theme / Hoster on other projects. No probs there... :-/ My hope is a workaround until the dev teams can react to that.

    – Amanahumpa
    Jan 4 at 15:46

















ask at: s.tk/wp

– T.Todua
Jan 4 at 15:12





ask at: s.tk/wp

– T.Todua
Jan 4 at 15:12













I am sorry. What does that mean?

– Amanahumpa
Jan 4 at 15:14





I am sorry. What does that mean?

– Amanahumpa
Jan 4 at 15:14













Thank you for editing and prividing a real resource. Your link sends me to the WP Core bug tracker and there it says it has to be a WP core bug, which is unsure. Moreover I can not wait for the next wordpress update to edit the existing pages I hope to get direction and inspiration here. To file a ticket is another step in the process. Please allow me to get help here.

– Amanahumpa
Jan 4 at 15:34





Thank you for editing and prividing a real resource. Your link sends me to the WP Core bug tracker and there it says it has to be a WP core bug, which is unsure. Moreover I can not wait for the next wordpress update to edit the existing pages I hope to get direction and inspiration here. To file a ticket is another step in the process. Please allow me to get help here.

– Amanahumpa
Jan 4 at 15:34













Did you try changing themes? Not just disabling plugins but also changing the theme? If that solves the issue, then you know it's the theme.

– disinfor
Jan 4 at 15:37





Did you try changing themes? Not just disabling plugins but also changing the theme? If that solves the issue, then you know it's the theme.

– disinfor
Jan 4 at 15:37













Yes, I did. When using a standard theme and standard editor it works but is of no use since it depends on the integrated page builder ('advanced layout editor'). Dev of the theme has no reports on that so far. I am using the exact same combo of WP / theme / Hoster on other projects. No probs there... :-/ My hope is a workaround until the dev teams can react to that.

– Amanahumpa
Jan 4 at 15:46





Yes, I did. When using a standard theme and standard editor it works but is of no use since it depends on the integrated page builder ('advanced layout editor'). Dev of the theme has no reports on that so far. I am using the exact same combo of WP / theme / Hoster on other projects. No probs there... :-/ My hope is a workaround until the dev teams can react to that.

– Amanahumpa
Jan 4 at 15:46










3 Answers
3






active

oldest

votes


















0














Here is an answer: WordPress v5.0.3 Gutenberg & JS error "Uncaught SyntaxError: missing ) after argument list"



The simplest way: Find & delete PHP Hook which added 'defer' to script (in the function.php file). Or if you have skills you can edit the code of the hook. Reason: Confusion/conflict with quotes (' & ") witch break down JS.



About 'defer' you can read here: https://www.w3schools.com/tags/att_script_defer.asp This is probably due to speed optimization on your website.






share|improve this answer


























  • Thanks for the part about the functions.php. This did the trick.

    – Amanahumpa
    Mar 31 at 12:59



















0














OK, so I struggled to find an answer myself to this - but this worked for me. I was stripping out the type='text/javascript' on script tags because it's not required for valid HTML5 - but WordPress insists on including it when you enqueue_script. I had a function in my theme like below to deal with this - so I just stopped it running in admin and it removed the error - your mileage may vary but maybe check your theme or plugins for something similar ;)



/**
*
* WordPress insists on inserting invalid javascript script tag definitions when enqueuing
* This removes this cruft - to check in the future - will WordPress get patched to support this?
*
*/
add_filter( 'script_loader_tag', 'mywfx_html5_clean_js_tags' );
function mywfx_html5_clean_js_tags( $input ) {

if ( !is_admin() ) {

$input = str_replace( "type='text/javascript' ", '', $input );
return str_replace( "'", '"', $input );

} else {

return $input;

}

}





share|improve this answer
























  • How is this related to the problem in the question?

    – fuxia
    Mar 29 at 14:56











  • I have the inpression this answer is about checking for injections and/or string replacements, thus actually related to the ptoblem stated. At least to the embarassing solution :-/

    – Amanahumpa
    Mar 31 at 12:57













  • @fuxia - this is relevant because the OP could not track down what was causing the issue. I was explaining that in my case the error that they were experiencing (same as me) was being caused by code that could be in a custom theme functions - therefore relevant!

    – Jonnyauk
    Apr 5 at 8:58



















0














Maybe the lesson to be learnt from injected code is: Check all potencial sources of code injection.



It turned out there was code put in the child themes' functions.php. At the time the question was asked it was as "unnessessary" to look for the problem there as it was dumb not to do that.



I am sorry and grateful for the help provided.
Thank you.






share|improve this answer


























  • Good to hear you tracked it down!

    – Jonnyauk
    Apr 5 at 8:59












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "110"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f324660%2fwordpress-post-editor-crashes-with-polyfill-typo%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Here is an answer: WordPress v5.0.3 Gutenberg & JS error "Uncaught SyntaxError: missing ) after argument list"



The simplest way: Find & delete PHP Hook which added 'defer' to script (in the function.php file). Or if you have skills you can edit the code of the hook. Reason: Confusion/conflict with quotes (' & ") witch break down JS.



About 'defer' you can read here: https://www.w3schools.com/tags/att_script_defer.asp This is probably due to speed optimization on your website.






share|improve this answer


























  • Thanks for the part about the functions.php. This did the trick.

    – Amanahumpa
    Mar 31 at 12:59
















0














Here is an answer: WordPress v5.0.3 Gutenberg & JS error "Uncaught SyntaxError: missing ) after argument list"



The simplest way: Find & delete PHP Hook which added 'defer' to script (in the function.php file). Or if you have skills you can edit the code of the hook. Reason: Confusion/conflict with quotes (' & ") witch break down JS.



About 'defer' you can read here: https://www.w3schools.com/tags/att_script_defer.asp This is probably due to speed optimization on your website.






share|improve this answer


























  • Thanks for the part about the functions.php. This did the trick.

    – Amanahumpa
    Mar 31 at 12:59














0












0








0







Here is an answer: WordPress v5.0.3 Gutenberg & JS error "Uncaught SyntaxError: missing ) after argument list"



The simplest way: Find & delete PHP Hook which added 'defer' to script (in the function.php file). Or if you have skills you can edit the code of the hook. Reason: Confusion/conflict with quotes (' & ") witch break down JS.



About 'defer' you can read here: https://www.w3schools.com/tags/att_script_defer.asp This is probably due to speed optimization on your website.






share|improve this answer















Here is an answer: WordPress v5.0.3 Gutenberg & JS error "Uncaught SyntaxError: missing ) after argument list"



The simplest way: Find & delete PHP Hook which added 'defer' to script (in the function.php file). Or if you have skills you can edit the code of the hook. Reason: Confusion/conflict with quotes (' & ") witch break down JS.



About 'defer' you can read here: https://www.w3schools.com/tags/att_script_defer.asp This is probably due to speed optimization on your website.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 15 at 12:08

























answered Jan 15 at 11:59









Konstantin PetlyaKonstantin Petlya

413




413













  • Thanks for the part about the functions.php. This did the trick.

    – Amanahumpa
    Mar 31 at 12:59



















  • Thanks for the part about the functions.php. This did the trick.

    – Amanahumpa
    Mar 31 at 12:59

















Thanks for the part about the functions.php. This did the trick.

– Amanahumpa
Mar 31 at 12:59





Thanks for the part about the functions.php. This did the trick.

– Amanahumpa
Mar 31 at 12:59













0














OK, so I struggled to find an answer myself to this - but this worked for me. I was stripping out the type='text/javascript' on script tags because it's not required for valid HTML5 - but WordPress insists on including it when you enqueue_script. I had a function in my theme like below to deal with this - so I just stopped it running in admin and it removed the error - your mileage may vary but maybe check your theme or plugins for something similar ;)



/**
*
* WordPress insists on inserting invalid javascript script tag definitions when enqueuing
* This removes this cruft - to check in the future - will WordPress get patched to support this?
*
*/
add_filter( 'script_loader_tag', 'mywfx_html5_clean_js_tags' );
function mywfx_html5_clean_js_tags( $input ) {

if ( !is_admin() ) {

$input = str_replace( "type='text/javascript' ", '', $input );
return str_replace( "'", '"', $input );

} else {

return $input;

}

}





share|improve this answer
























  • How is this related to the problem in the question?

    – fuxia
    Mar 29 at 14:56











  • I have the inpression this answer is about checking for injections and/or string replacements, thus actually related to the ptoblem stated. At least to the embarassing solution :-/

    – Amanahumpa
    Mar 31 at 12:57













  • @fuxia - this is relevant because the OP could not track down what was causing the issue. I was explaining that in my case the error that they were experiencing (same as me) was being caused by code that could be in a custom theme functions - therefore relevant!

    – Jonnyauk
    Apr 5 at 8:58
















0














OK, so I struggled to find an answer myself to this - but this worked for me. I was stripping out the type='text/javascript' on script tags because it's not required for valid HTML5 - but WordPress insists on including it when you enqueue_script. I had a function in my theme like below to deal with this - so I just stopped it running in admin and it removed the error - your mileage may vary but maybe check your theme or plugins for something similar ;)



/**
*
* WordPress insists on inserting invalid javascript script tag definitions when enqueuing
* This removes this cruft - to check in the future - will WordPress get patched to support this?
*
*/
add_filter( 'script_loader_tag', 'mywfx_html5_clean_js_tags' );
function mywfx_html5_clean_js_tags( $input ) {

if ( !is_admin() ) {

$input = str_replace( "type='text/javascript' ", '', $input );
return str_replace( "'", '"', $input );

} else {

return $input;

}

}





share|improve this answer
























  • How is this related to the problem in the question?

    – fuxia
    Mar 29 at 14:56











  • I have the inpression this answer is about checking for injections and/or string replacements, thus actually related to the ptoblem stated. At least to the embarassing solution :-/

    – Amanahumpa
    Mar 31 at 12:57













  • @fuxia - this is relevant because the OP could not track down what was causing the issue. I was explaining that in my case the error that they were experiencing (same as me) was being caused by code that could be in a custom theme functions - therefore relevant!

    – Jonnyauk
    Apr 5 at 8:58














0












0








0







OK, so I struggled to find an answer myself to this - but this worked for me. I was stripping out the type='text/javascript' on script tags because it's not required for valid HTML5 - but WordPress insists on including it when you enqueue_script. I had a function in my theme like below to deal with this - so I just stopped it running in admin and it removed the error - your mileage may vary but maybe check your theme or plugins for something similar ;)



/**
*
* WordPress insists on inserting invalid javascript script tag definitions when enqueuing
* This removes this cruft - to check in the future - will WordPress get patched to support this?
*
*/
add_filter( 'script_loader_tag', 'mywfx_html5_clean_js_tags' );
function mywfx_html5_clean_js_tags( $input ) {

if ( !is_admin() ) {

$input = str_replace( "type='text/javascript' ", '', $input );
return str_replace( "'", '"', $input );

} else {

return $input;

}

}





share|improve this answer













OK, so I struggled to find an answer myself to this - but this worked for me. I was stripping out the type='text/javascript' on script tags because it's not required for valid HTML5 - but WordPress insists on including it when you enqueue_script. I had a function in my theme like below to deal with this - so I just stopped it running in admin and it removed the error - your mileage may vary but maybe check your theme or plugins for something similar ;)



/**
*
* WordPress insists on inserting invalid javascript script tag definitions when enqueuing
* This removes this cruft - to check in the future - will WordPress get patched to support this?
*
*/
add_filter( 'script_loader_tag', 'mywfx_html5_clean_js_tags' );
function mywfx_html5_clean_js_tags( $input ) {

if ( !is_admin() ) {

$input = str_replace( "type='text/javascript' ", '', $input );
return str_replace( "'", '"', $input );

} else {

return $input;

}

}






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 29 at 13:13









JonnyaukJonnyauk

5016




5016













  • How is this related to the problem in the question?

    – fuxia
    Mar 29 at 14:56











  • I have the inpression this answer is about checking for injections and/or string replacements, thus actually related to the ptoblem stated. At least to the embarassing solution :-/

    – Amanahumpa
    Mar 31 at 12:57













  • @fuxia - this is relevant because the OP could not track down what was causing the issue. I was explaining that in my case the error that they were experiencing (same as me) was being caused by code that could be in a custom theme functions - therefore relevant!

    – Jonnyauk
    Apr 5 at 8:58



















  • How is this related to the problem in the question?

    – fuxia
    Mar 29 at 14:56











  • I have the inpression this answer is about checking for injections and/or string replacements, thus actually related to the ptoblem stated. At least to the embarassing solution :-/

    – Amanahumpa
    Mar 31 at 12:57













  • @fuxia - this is relevant because the OP could not track down what was causing the issue. I was explaining that in my case the error that they were experiencing (same as me) was being caused by code that could be in a custom theme functions - therefore relevant!

    – Jonnyauk
    Apr 5 at 8:58

















How is this related to the problem in the question?

– fuxia
Mar 29 at 14:56





How is this related to the problem in the question?

– fuxia
Mar 29 at 14:56













I have the inpression this answer is about checking for injections and/or string replacements, thus actually related to the ptoblem stated. At least to the embarassing solution :-/

– Amanahumpa
Mar 31 at 12:57







I have the inpression this answer is about checking for injections and/or string replacements, thus actually related to the ptoblem stated. At least to the embarassing solution :-/

– Amanahumpa
Mar 31 at 12:57















@fuxia - this is relevant because the OP could not track down what was causing the issue. I was explaining that in my case the error that they were experiencing (same as me) was being caused by code that could be in a custom theme functions - therefore relevant!

– Jonnyauk
Apr 5 at 8:58





@fuxia - this is relevant because the OP could not track down what was causing the issue. I was explaining that in my case the error that they were experiencing (same as me) was being caused by code that could be in a custom theme functions - therefore relevant!

– Jonnyauk
Apr 5 at 8:58











0














Maybe the lesson to be learnt from injected code is: Check all potencial sources of code injection.



It turned out there was code put in the child themes' functions.php. At the time the question was asked it was as "unnessessary" to look for the problem there as it was dumb not to do that.



I am sorry and grateful for the help provided.
Thank you.






share|improve this answer


























  • Good to hear you tracked it down!

    – Jonnyauk
    Apr 5 at 8:59
















0














Maybe the lesson to be learnt from injected code is: Check all potencial sources of code injection.



It turned out there was code put in the child themes' functions.php. At the time the question was asked it was as "unnessessary" to look for the problem there as it was dumb not to do that.



I am sorry and grateful for the help provided.
Thank you.






share|improve this answer


























  • Good to hear you tracked it down!

    – Jonnyauk
    Apr 5 at 8:59














0












0








0







Maybe the lesson to be learnt from injected code is: Check all potencial sources of code injection.



It turned out there was code put in the child themes' functions.php. At the time the question was asked it was as "unnessessary" to look for the problem there as it was dumb not to do that.



I am sorry and grateful for the help provided.
Thank you.






share|improve this answer















Maybe the lesson to be learnt from injected code is: Check all potencial sources of code injection.



It turned out there was code put in the child themes' functions.php. At the time the question was asked it was as "unnessessary" to look for the problem there as it was dumb not to do that.



I am sorry and grateful for the help provided.
Thank you.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 31 at 12:55

























answered Mar 30 at 17:52









AmanahumpaAmanahumpa

34




34













  • Good to hear you tracked it down!

    – Jonnyauk
    Apr 5 at 8:59



















  • Good to hear you tracked it down!

    – Jonnyauk
    Apr 5 at 8:59

















Good to hear you tracked it down!

– Jonnyauk
Apr 5 at 8:59





Good to hear you tracked it down!

– Jonnyauk
Apr 5 at 8:59


















draft saved

draft discarded




















































Thanks for contributing an answer to WordPress Development Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f324660%2fwordpress-post-editor-crashes-with-polyfill-typo%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas