Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change title and description type to HTML #16

Open
grappler opened this issue Apr 10, 2019 · 0 comments
Open

Change title and description type to HTML #16

grappler opened this issue Apr 10, 2019 · 0 comments

Comments

@grappler
Copy link
Contributor

grappler commented Apr 10, 2019

For Swisscom we changed the type from plain to HTML. I am not sure if it makes sense here. If we make the change we have not make sure the content is entity-encoded.

We can close this issue and reopen later if there is need elsewhere.

diff --git a/classes/plugin.php b/classes/plugin.php
index 38c87f2..20809b1 100644
--- a/classes/plugin.php
+++ b/classes/plugin.php
@@ -176,7 +176,7 @@ class WP_Feed_Post_Thumbnail_Plugin {
                                height="<?php echo absint( $img_attr[2] ); ?>">
-                               <media:title type="plain">
+                               <media:title type="html">
                                        <![CDATA[<?php echo sanitize_text_field( $title ); ?>]]>
                                </media:title>
@@ -184,7 +184,7 @@ class WP_Feed_Post_Thumbnail_Plugin {
                                <?php if ( isset( $options['description'] ) && $options['description'] && ! empty( $description ) ) : ?>
-                                       <media:description type="plain"><![CDATA[<?php echo wp_kses_post( $description ); ?>]]></media:description>
+                                       <media:description type="html"><![CDATA[<?php echo wp_kses_post( $description ); ?>]]></media:description>
                                <?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant