PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/presenters/open-graph/description-presenter.php +7 -4 18.228.5 View file →
@@ -24,19 +24,22 @@
24 24 */
25 25 protected $tag_format = self::META_PROPERTY_CONTENT;
26 26
27 27 /**
28 - * Run the Open Graph description through replace vars and the `wpseo_opengraph_desc` filter.
28 + * Run the Open Graph description through replace vars and the `wpseo_opengraph_desc` filter and sanitization.
29 29 *
30 30 * @return string The filtered description.
31 31 */
32 32 public function get() {
33 + $meta_og_description = $this->replace_vars( $this->presentation->open_graph_description );
34 +
33 35 /**
34 36 * Filter: 'wpseo_opengraph_desc' - Allow changing the Yoast SEO generated Open Graph description.
35 37 *
36 - * @api string The description.
37 - *
38 + * @param string $description The description.
38 39 * @param Indexable_Presentation $presentation The presentation of an indexable.
39 40 */
40 - return \trim( \apply_filters( 'wpseo_opengraph_desc', $this->replace_vars( $this->presentation->open_graph_description ), $this->presentation ) );
41 + $meta_og_description = \apply_filters( 'wpseo_opengraph_desc', $meta_og_description, $this->presentation );
42 + $meta_og_description = $this->helpers->string->strip_all_tags( \stripslashes( $meta_og_description ) );
43 + return \trim( $meta_og_description );
41 44 }
42 45 }