Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions includes/class-sensei-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,7 @@ class Sensei_Frontend {
*/
public function __construct() {

$this->allowed_html = array(
'embed' => array(),
'iframe' => array(
'width' => array(),
'height' => array(),
'src' => array(),
'frameborder' => array(),
'allowfullscreen' => array(),
),
'video' => Sensei_Wp_Kses::get_video_html_tag_allowed_attributes(),
);
$this->allowed_html = Sensei_Wp_Kses::get_default_wp_kses_allowed_html();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should consider also allowing any tags here that wp_kses_post allows:

$this->allowed_html = array_merge( Sensei_Wp_Kses::get_default_wp_kses_allowed_html(), wp_kses_allowed_html( 'post' ) );

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you are right but this is a field for any video so we can't allow other tags, i thing does'e need to allow wp_kses_allowed_html( 'post' ),

Copy link
Author

@bhavik-dreamz bhavik-dreamz Mar 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateds now #2992

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree. For example, Vimeo embeds include HTML tags like <p> and <a> that would be stripped out by this.

Besides, if we're allowing people to save HTML in the video embed code for a lesson in WP Admin, but then don't display it on the front-end, what's the point?


// Template output actions.
add_action( 'sensei_before_main_content', array( $this, 'sensei_output_content_wrapper' ), 10 );
Expand Down