Title: Validation issue with scripts
Last modified: December 19, 2016

---

# Validation issue with scripts

 *  Resolved [kobzeci2](https://wordpress.org/support/users/kobzeci2/)
 * (@kobzeci2)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/validation-issue-with-scripts/)
 * Hi,
 * Thanks for this great plugin. İt fixes most of the errors with native AMP plugin.
 * I have just one error remaining to get validation. The following script is injected
   by theme and is there a way to block it.
 * I use Amp – AMP for WP – Accelerated Mobile Pages and Glue for Yoast
 * Error: The tag ‘script’ is disallowed except in specific forms.
 * [https://validator.ampproject.org/#url=http%3A%2F%2Fwww.doyouknowturkey.com%2Fsuccessor-of-tarkan-a-new-star-murat-boz%2Famp%2F](https://validator.ampproject.org/#url=http%3A%2F%2Fwww.doyouknowturkey.com%2Fsuccessor-of-tarkan-a-new-star-murat-boz%2Famp%2F)
 * is there a way to block the following code by this addon or functions php?
 * > <script>
   >  (function(){
   >  var html_jquery_obj = jQuery(‘html’);
   >  if (html_jquery_obj.length && (html_jquery_obj.is(‘.ie8’) || html_jquery_obj.
   > is(‘.ie9’))) {
   >  var path = ‘[http://www.doyouknowturkey.com/wp-content/themes/Newspaper/style.css&#8217](http://www.doyouknowturkey.com/wp-content/themes/Newspaper/style.css&#8217);;
   >  jQuery.get(path, function(data) {
   >  var str_split_separator = ‘#td_css_split_separator’;
   >  var arr_splits = data.
   > split(str_split_separator); var arr_length = arr_splits.length;
   >  if (arr_length > 1) {
   >  var dir_path = ‘[http://www.doyouknowturkey.com/wp-content/themes/Newspaper&#8217](http://www.doyouknowturkey.com/wp-content/themes/Newspaper&#8217);;
   > 
   > var splited_css = ”;
   >  for (var i = 0; i < arr_length; i++) {
   >  if (i > 0) { arr_splits[i] = str_split_separator
   > + ‘ ‘ + arr_splits[i]; } //jQuery(‘head’).append(‘<style>’ + arr_splits[i] 
   > + ‘</style>’);
   >  var formated_str = arr_splits[i].replace(/\surl\(\'(?!data\:)/gi, function
   > regex_function(str) {
   >  return ‘ url(\” + dir_path + ‘/’ + str.replace(/url\(\’/
   > gi, ”).replace(/^\s+|\s+$/gm,”); });
   >  splited_css += “<style>” + formated_str + “</style>”;
   >  }
   >  var td_theme_css = jQuery(‘link#td-theme-css’);
   >  if (td_theme_css.length) {
   >  td_theme_css.after(splited_css); } } }); } })();
   > </script>
 * best,

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

 *  Thread Starter [kobzeci2](https://wordpress.org/support/users/kobzeci2/)
 * (@kobzeci2)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/validation-issue-with-scripts/#post-8569969)
 * i’ve just found it. Nextgen Gallery plugin was causing a problem. It somehow 
   splist the scripts. Deactivating the plugin gives valid result. Now i’ll do manual
   work to trnasform old galleries.
 * Best,
    Zeki
 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/validation-issue-with-scripts/#post-8570623)
 * [@kobzeci2](https://wordpress.org/support/users/kobzeci2/)
    I’m glad to see that
   your issue has been resolved! 🙂

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

The topic ‘Validation issue with scripts’ is closed to new replies.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

## Tags

 * [Validation error](https://wordpress.org/support/topic-tag/validation-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/validation-issue-with-scripts/#post-8570623)
 * Status: resolved