Code Monkey home page Code Monkey logo

Comments (3)

arnaudbroes avatar arnaudbroes commented on August 16, 2024

@calebsmithdev it indeed looks like this filter wasn't very well thought out. We definitely still want to sanitize whatever's passed through the filter, just for security purposes, but what the filter really ought to be doing is filter the new data instead of the existing data on the AIOSEO post object.

I'm going to update the code to this in our 4.6.2 update -

$thePost = self::getPost( $postId );
$data    = apply_filters( 'aioseo_save_post', $data, $thePost );

// Before setting the data, we check if the title/description are the same as the defaults and clear them if so.
$data    = self::checkForDefaultFormat( $postId, $thePost, $data );
$thePost = self::sanitizeAndSetDefaults( $postId, $thePost, $data );

I assume that will work for you?

from all-in-one-seo-pack.

calebsmithdev avatar calebsmithdev commented on August 16, 2024

That works perfectly! Thanks for taking a look at this.

from all-in-one-seo-pack.

arnaudbroes avatar arnaudbroes commented on August 16, 2024

@calebsmithdev no problem, thanks for confirming. This has been staged for our 4.6.2 release so I'll be closing the issue now.

from all-in-one-seo-pack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.