• utcbrij

    (@utcbrij)


    Since the last update to 4.24.6, when highlighting option(s) are checked, the page loads are glitchy. Some of the following things happen when doing a search, though not consistently. Sometimes refreshing the page solves it, sometimes not:

    –YouTube videos disappear
    –CSS files don’t load
    –Images/image galleries don’t render correctly
    –Get a “This site can’t be reached.” notification

    When we uncheck highlight options, the page renders correctly. Here’s the page we’re looking at. The highlight options are currently all unchecked.

    https://blog.utc.edu/news/2024/11/utcs-dorothy-and-jim-kennedy-health-sciences-building-breaks-ground/

    • This topic was modified 12 months ago by utcbrij.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    That is unfortunate, but the other option was a security vulnerability that would allow malicious scripts to run on your site.

    It’s possible you can fix this by adjusting what HTML is allowed using the wp_kses_allowed_html filter hook. That’s what WordPress uses to control what is removed. For example, keeping iframe might help with Youtube embeds and if you have inline CSS scripts, you should allow script:

    add_filter( 'wp_kses_allowed_html', function( $tags ) {
    $tags['iframe'] = true;
    $tags['script'] = true;
    return $tags;
    } );

    But the easiest option is to disable the highlighting feature.

    Hello Mikko,

    I’m also having this problem on my site because of the highlighting feature. I added your script, which partially resolves the issue.

    Explanation:

    Before your script, I had an error with my Gravity Forms plugin.
    After using your script, by keeping the highlighting feature, I no longer have the PHP error, but my form fields are no longer fillable or visible.

    Do you have a correction to make to keep the highlighting feature, please?

    Thank you in advance. Best regards. Lionel

    Plugin Author Mikko Saari

    (@msaari)

    The snippet above might help, but you may need to allow other HTML tags. I do not know what those are, as I am not familiar with Gravity Forms in sufficient detail.

    In general, I recommend disabling the highlighting: that’s the easiest solution.

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

The topic ‘Highlight causes page loading glitches’ is closed to new replies.