The SEO Framework

★︎ My account
  • Extensions
  • Documentation
  • Pricing
  1. Home
  2. Plugin Changelog
  3. 4.2.7

4.2.7

November 9, 2022 by Sybre Waaijer

This minor update brings you a revamped HTML parser and a new option for tuning its accuracy for descriptions. First-time installers are now notified when metadata can be transported from other SEO plugins, the SEO Bar recognizes syntax from Rank Math, and Advanced Query Protection blocks new SEO attacks that could tank your rankings. We also fixed a couple of bugs.

> v4.7.2.1: Fixed error on PHP 7.2 installations where the upgrade process couldn’t be completed due to syntax used supported on PHP 7.3 or later only. Props opicron.

Detailed log

> View code changes. (Skips over 4.2.6 because that’s a backported patch.)
> View closed issues.

For everyone

  • Added:
    • Added Advanced Generation Settings: HTML parsing methods.
      • Consider increasing the number of passes when the description generator is inaccurate in selecting content or sticks two words together without spacing. You should put it back on the fastest method if this doesn’t do anything.
      • The default setting is “Fast (2 passes)”.
    • For first-time installers only, we test if the leftover metadata of Yoast SEO and Rank Math exists. We output a notice suggesting reading our data migration guide when found. This notice is conditional; this notice is shown when all these conditions are met:
      1. The user can install plugins;
      2. Admin screens /index.php, /edit.php, /edit-tags.php, or admin.php?page=theseoframework-settings is visited;
      3. Seven days haven’t passed since installation;
      4. Up to 69 times accumulating all users (we want this to be there for the user to ponder, but not forever);
      5. The notice has yet to be dismissed.
    • Added title and description leftover syntax checks to the SEO Bar for Rank Math.
  • Changed:
    • The sitemap’s transient settings have been moved from “General > Performance” to “Sitemap > General”.
  • Improved:
    • The HTML parser for descriptions and images now is less likely to be fooled by fake HTML in attribute text. To achieve this, it now parses in passes.
    • The SEO Bar now checks for more leftover syntax of Yoast SEO in titles and descriptions.
    • Advanced Query Protection now detects more rogue requests, specifically:
      • example.com/?search=text when the homepage is static, where a can be anything.
      • example.com/?cat=text%2C2147483647%2C1text, where 2147483647 is a category ID that doesn’t exist, and the final 1 is a category that does exist, where text is anything non-numeric.
      • Put online a link to any site with these rogue requests, and once Googlebot spots those links, their site will be taken off from Google Search within a few days. The more links you add, the faster this process is. Our protection is genuine technical SEO, unique to TSF.
    • SEO Bar now detects more types of Yoast SEO’s title and description variable syntax.
    • Description and title sanitization now trim non-breaking spaces from sentences that were found at the end or beginning of multi-line sentences.
    • Descriptions are no longer cut off after decimal pointers. Before, “WordPress 6.1.0 is out” would cut off with “WordPress 6.”; now, “6.1.0” is recognized as a single digit.
  • Fixed:
    • Addressed a regression where the homepage-as-page comment-pagination and page-protection (private/password protected) index-protection override was ignored.
      • This was a non-issue because TSF never created canonical URLs for comment pages. This bug only increased the crawling time.
    • Addressed a regression where archive exclusion settings also excluded posts from the sitemap.
  • Other:
    • We reenabled our yearly sale notification. The WP Notify project is underway, helping us to make this less annoying in the future.
      • Again, no, this is not a slippery slope; we’re not testing the waters. Last year we received a negative review because the reviewer was foreboding the worst; still, we cannot sustain this project well without reminding our users we’re operating a full-time business.
      • Several conditions must be met before the link is displayed.
      • Add define('TSF_DISABLE_SUGGESTIONS', true ); to wp-config.php to permanently block all (current and future) hints that help us sustain this project.

For translators

  • Added: New translations are available.
  • Updated: The POT file contains new translations.

For developers

  • Added:
    • Option auto_descripton_html_method, accepts values fast, accurate, and thorough. It defaults to fast.
    • Filter the_seo_framework_build_sitemap_base now runs whenever the base sitemap is being generated.
    • Method s_description_html_method(), for sanitizating option auto_descripton_html_method.
    • Method has_unprocessed_syntax() detects any valid syntax in text from Yoast SEO and Rank Math.
    • Method has_rankmath_syntax(), used by has_unprocessed_syntax().
    • Method auto_descripton_html_method(). I now see that this method has ‘method’ in its name. Tough luck.
  • Changed:
    • Filter the_seo_framework_input_guidelines added two more paramters ($c_adjust and $locale).
    • Filter the_seo_framework_scripts now returns a sequential array of scripts instead of a multidimensional array of sequential arrays of scripts.
      • [ 0 => [ 0 => scriptA, 1 => scriptB ], 1 => scriptC ] is now [ 0 => scriptA, 1 => scriptB, 2 => scriptC ]
    • Method get_current_post_author_meta() no longer applies memoization.
    • Method strip_tags_cs():
      1. Revamped the HTML lookup: it now (more) accurately processes HTML, and is less likely to be fooled by HTML tags in attributes.
      2. The ‘space’ index no longer has default fieldset, figcaption, form, main, nav, pre, table, and tfoot.
      3. The space index now has added to default details, hgroup, and hr.
      4. The ‘clear’ index no longer has default bdo, hr, link, meta, option, samp, style, and var.
      5. The ‘clear’ index now has added to default area, audio, datalist, del, dialog, fieldset, form, map, menu, meter, nav, object, output, pre, progress, s, table, and template.
      6. Added the ‘passes’ index to $args. This tells the maximum passes’ space’ may process. Read TSF option auto_descripton_html_method to use the user-defined method.
      7. Now replaces all elements passed with spaces. For void elements, or phrasing elements, you’d want to omit those from ‘$args’ so it falls through to strip_tags().
      8. Added preparation memoization using cache delimiters $args['space'] and $args['clear'].
    • Method s_excerpt():
      1. No longer clears figcaption, hr, link, meta, option, or tfoot.
      2. Now clears area, audio, datalist, del, dialog, dl, hgroup, menu, meter, ol, object, output, progress, s, template, and ul.
      3. Now adds spaces around blockquote, details, and hr.
      4. Now ignores dd, dl, dt, li, main, for they are inherently excluded or ignored anyway.
      5. Now processed the auto_descripton_html_method option for stripping tags.
    • Method array_merge_recursive_distinct():
      1. Now supports a single array entry without causing issues.
      2. Reduced number of opcodes by roughly 27% by reworking it.
      3. Now no longer throws warnings with qubed+ arrays.
      4. Now no longer prevents scalar values overwriting arrays.
    • Method is_query_exploited():
      1. Added detection not_home_as_page, specifically for query variable search.
      2. Improved detection for cat and author, where the value may only be numeric above 0.
    • Methods s_description_raw() and s_title_raw() now convert nbsp before singleline, because singleline also uses trim() on old nbsp.
      • Basically, this prevents leftover spaces at the start or end of the description.
    • Method The_SEO_Framework\Builders\Images::get_content_image_details():
      1. No longer accidentally matches <imganything or <img notsrc="source">.
      2. Can no longer use images from datalist, dialog, hgroup, menu, ol, object, output, and template elements.
      3. No longer expect images from dd, dt, figcaption, li, tfoot, br, hr, link, meta, option, samp.
    • Method trim_excerpt() now considers floating numerics as one word.
  • Fixed:
    • Method get_generated_single_term_title() now invokes proper filters when ‘category’ or ‘tag’ taxonomies are used.
    • Method get_primary_term() now correctly memoizes when no terms for a post can be found.
    • Addressed an issue where TSF’s description and title HTML input lookups were strictly dependent on their presence, causing JS errors when List Edit or meta boxes were unloaded programmatically.
Filed Under: The SEO Framework Changelog

About Sybre Waaijer

Developer of The SEO Framework plugins.
Twitter  GitHub  WordPress

Looking for something?

Do more with extensions

Local

View extension
Get more customers to your restaurant and shop.

Title Fix

View extension
Running an outdated theme? Use this.

Get Extension Manager

Commercial

The SEO Framework
Trademark of CyberWire B.V.
Leidse Schouw 2
2408 AE Alphen a/d Rijn
The Netherlands
KvK: 83230076
BTW/VAT: NL862781322B01

Twitter  GitHub

Professional

Pricing
About
Support
Press

Rational

Blog
Privacy Policy
Terms and Conditions
Refund Policy

Practical

Documentation
TSF on WordPress
TSF on GitHub
TSFEM on here
TSFEM on GitHub
Feature Highlights

Keywords in 2025 › The SEO Framework