• Resolved mwarbinek

    (@mwarbinek)


    I just updated the maintenance plugin and now the HTML code that I included in the description field box is now showing on the maintenance page, top left corner.

    This means the scripting of the plugin has escaped the HTML characters allowing them to display on the maintenance page.

    I tried to locate the scripting to correct it, but have not found it yet. I am sure this was an error caused in the update because I changed nothing after the update.

    Before the HTML coding in the description field box worked great, now it doesn’t.

    Is there a fix to this?

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter mwarbinek

    (@mwarbinek)

    I found the cause of the problem.

    Inside the “load” folder there is an index.php. The coding of that index file provides for the insertion of HTML <head> “meta” tags.

    These are the offending lines that caused the problem,

    Line 26:
    <meta name="description" content="...">

    Line 30:
    <meta property="og:description" content="...">

    You inserted a PHP echo command that pulled the information from the description field box and if that description field box contains any HTML coding, it breaks the <head> META tag and causes the browser to render the HTML inline and block styling codes like <div> or <p> or <span> etc.

    Since the description field box in the plugin settings can accept HTML coding for some content styling, your going to have to fix the bugs. I think maybe use a different field box in the settings page that we can fill out specifically for the meta tags and not use the “description” function (description field box content) to insert content into the meta tags?

    FIX
    How I fixed it was commented out those offending lines and once done, the description text and HTML code will not appear. Although, that defeats the use of those <meta> tags, which is why you need to fix it.

    • This reply was modified 8 years, 2 months ago by mwarbinek. Reason: Added content

    Thanks Mark! This helped me with a quick fix but I agree, the Meta tag information should be taken from a different field then the description. Maybe a Meta description field instead?

    Thread Starter mwarbinek

    (@mwarbinek)

    Sure, a Meta tag description field box in the settings would work. – However it is done.

    I have the same problem.
    The description is duplicated in the meta-description and gets in the left corner of the screen.

    Thread Starter mwarbinek

    (@mwarbinek)

    Yep, that’s the corner office ??

    To get to the folder named “load”, you need FTP access or File Manager in Cpanel.

    • This reply was modified 8 years, 2 months ago by mwarbinek.
    • This reply was modified 8 years, 2 months ago by mwarbinek. Reason: correction
    Thread Starter mwarbinek

    (@mwarbinek)

    Sorry, this is not good, Fruit Code. Here is why.

    The GitHub download page shows 2 fixes for the meta description, both from the same author and both are different from each other. Which is the proper fix?

    This method to go to GitHub is not good for general users who have a limited (if any) understanding of PHP. They won’t know what to do with GitHub or how it works, let alone download anything. It’s not good to assume the general user can understand what you refer to, they don’t work at the same level.

    Best to include that in the next update and let us know when because it is a obvious bug.

    Both are the correct fix. Commits are submitted in a liner fashion.

    Open /wp-content/plugins/maintenance/load/index.php and replace lines 7-10:

    Replace This:

    $page_title = wp_kses_post($mt_options['page_title']);
    $description = wp_kses_post($mt_options['description']);
    if (empty($page_title)) $page_title = get_bloginfo('title');
    if (empty($description)) $description = get_bloginfo('description');

    With This:

    $page_title = get_bloginfo('title');
    $description = get_bloginfo('description');

    Then un-comment the Page description and title so the gage has one….
    The fix is in the code base they just have not pushed it to wordpress yet.

    • This reply was modified 8 years, 2 months ago by kwcjr.
    • This reply was modified 8 years, 2 months ago by kwcjr.
    • This reply was modified 8 years, 2 months ago by kwcjr.
    • This reply was modified 8 years, 2 months ago by kwcjr.
    Thread Starter mwarbinek

    (@mwarbinek)

    I appreciate the clarification and the help. I am sure others appreciate it too.

    Will do the fix.

    Thanks

    Same problem here.
    I used strip_tags() instead of removing meta tags.
    I think they are needed for sharing.

    Hi,

    You can replace all the plugin folder, just download it from github:
    https://github.com/Fruitfulcode/Maintenance

    You don’t need to change something in your code. Or you can wait for the new version of Maintenance.

    Regards

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘HTML in Description – Escaped and Shows on Maintenance Page’ is closed to new replies.