@@ -44,13 +44,12 @@ function tootpress_paint_toot( $mastodon_id, $date, $content, $media , $instance
4444
4545 // Toot Content
4646 $ content =tootpress_remove_target_blank ($ content );
47- $ content =wp_kses ($ content , tootpress_escaping_allowed_html () );
48- $ content =tootpress_toot_content_filter_apply ($ content );
49- $ toot_html .='<div class="toot-content"> ' .$ content .'</div> ' ;
47+ $ content =tootpress_toot_content_filter_apply ($ content );
48+ $ toot_html .='<div class="toot-content"> ' .wp_kses_post ($ content ).'</div> ' ;
5049
5150 // Toot Image
5251 if ($ media ){
53- $ toot_html .=wp_kses ( tootpress_paint_image ($ mastodon_id), tootpress_escaping_allowed_html () );
52+ $ toot_html .=tootpress_paint_image ($ mastodon_id );
5453 }
5554
5655 // Toot End
@@ -87,15 +86,15 @@ function tootpress_paint_image($tootid){
8786 if ($ amount_of_images >1 ) {
8887 // Galleries
8988 $ image_html .='toot-image-gallery ' ;
90- $ image_html .='toot-image-gallery- ' .$ amount_of_images .' ' ;
91- $ image_html .='toot-image- ' .($ i +1 );
89+ $ image_html .='toot-image-gallery- ' .( int ) $ amount_of_images .' ' ;
90+ $ image_html .='toot-image- ' .(int ) ( $ i +1 );
9291 } else {
9392 // Single Images
9493 $ image_html .='toot-image-single ' ;
9594 }
9695
9796 $ image_html .='"> ' ;
98- $ image_html .=tootpress_create_image_tag ($ toot_image [$ i ]['attachment_file ' ],$ toot_image [$ i ]['attachment_description ' ],$ amount_of_images ,($ i +1 ));
97+ $ image_html .=tootpress_paint_image_tag ($ toot_image [$ i ]['attachment_file ' ],$ toot_image [$ i ]['attachment_description ' ],$ amount_of_images ,($ i +1 ));
9998 $ image_html .='</div> ' ;
10099
101100 }
@@ -115,7 +114,7 @@ function tootpress_paint_image($tootid){
115114 * @return string Image Tag
116115 */
117116
118- function tootpress_create_image_tag ($ filename , $ description , $ amount_of_images , $ image_number ) {
117+ function tootpress_paint_image_tag ($ filename , $ description , $ amount_of_images , $ image_number ) {
119118
120119 $ image_tag ='<img ' ;
121120 $ image_tag .='src=" ' ;
0 commit comments