Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5972865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:43:07+00:00 2026-05-22T20:43:07+00:00

I added this to my WordPress page if (script.readyState && script.onload!==null){ script.onreadystatechange= function ()

  • 0

I added this to my WordPress page

if (script.readyState && script.onload!==null){
    script.onreadystatechange= function () {
        if (this.readyState == 'complete') mce_preload_check();
    }
}

and the && is being turned to

if (script.readyState && script.onload!==null){

I pasted this in WordPress HTML view and I made sure this was fine but WordPress keeps displaying this. How to address this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:43:08+00:00Added an answer on May 22, 2026 at 8:43 pm

    You need to disable WP’s autoformatting. WP will auto format even in the html editor, and the spaces and line breaks will break your javascript.

    Use this plugin http://wordpress.org/extend/plugins/wp-no-format/

    Update 4/08/2015: plugin is dated but still works for me.

    This also works: add the plugin directly to functions.php and bracket the your javascript in <!-- noformat on --> and <!-- noformat off --> tags

    Add to functions.php file:

    function newautop($text)
    {
        $newtext = "";
        $pos = 0;
    
        $tags = array('<!-- noformat on -->', '<!-- noformat off -->');
        $status = 0;
    
        while (!(($newpos = strpos($text, $tags[$status], $pos)) === FALSE))
        {
            $sub = substr($text, $pos, $newpos-$pos);
    
            if ($status)
                $newtext .= $sub;
            else
                $newtext .= convert_chars(wptexturize(wpautop($sub)));      //Apply both functions (faster)
    
            $pos = $newpos+strlen($tags[$status]);
    
            $status = $status?0:1;
        }
    
        $sub = substr($text, $pos, strlen($text)-$pos);
    
        if ($status)
            $newtext .= $sub;
        else
            $newtext .= convert_chars(wptexturize(wpautop($sub)));      //Apply both functions (faster)
    
        //To remove the tags
        $newtext = str_replace($tags[0], "", $newtext);
        $newtext = str_replace($tags[1], "", $newtext);
    
        return $newtext;
    }
    
    function newtexturize($text)
    {
        return $text;   
    }
    
    function new_convert_chars($text)
    {
        return $text;   
    }
    
    remove_filter('the_content', 'wpautop');
    add_filter('the_content', 'newautop');
    
    remove_filter('the_content', 'wptexturize');
    add_filter('the_content', 'newtexturize');
    
    remove_filter('the_content', 'convert_chars');
    add_filter('the_content', 'new_convert_chars');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note that I used this with wordpress. I added this function to functions.php: function
I use DATEDIFF function to filter records added this week only: DATEDIFF(week, DateCreated, GETDATE())
I created a new content type for a wiki page library. I added this
I've just followed this example from Wordpress and I have successfully added an extra
I'm wanting to include a function into a WordPress page, but since WordPress doesn't
I am following the tutorial i found in this page http://javahunter.wordpress.com/2010/09/25/integrating-captcha-in-jsf-2-0/ to integrate a
For Wordpress, when creating a page, a menu entry will be added to top
Under Pages menu in Wordpress Admin page, I got this layout: Pages Edit (url:
I'm using the wp_list_bookmarks() function in wordpress to get links that have been added
ADDED: This question is now, I believe, subsumed by this one: Using GNU Screen

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.