From 042417e0a59102e98312a462dbfc3432a90d9389 Mon Sep 17 00:00:00 2001 From: Faishal Saiyed Date: Thu, 8 Jan 2015 19:58:35 +0530 Subject: [PATCH] Add missing escaping --- class-jobs.php | 2 +- class-post-public.php | 7 +++---- templates-admin/translation-editor-terms.php | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/class-jobs.php b/class-jobs.php index bf351f0..57f482a 100755 --- a/class-jobs.php +++ b/class-jobs.php @@ -835,7 +835,7 @@ public function metabox_post_translations( WP_Post $post, array $metabox ) { 'bbl_job_post' => "{$post->post_type}|{$post->ID}", ); ?> -

+

code}" ); + $new_post_type = sanitize_key( strtolower( "{$post_type}_{$lang->code}" ) ); if ( strlen( $new_post_type ) > 20 ) { trigger_error( sprintf( __( 'Warning: The translated name for the post type %s is longer than %d characters. This *will* cause problems.', 'babble' ), @@ -996,9 +995,9 @@ public function manage_posts_custom_column( $column_name, $post_id ) { return; } $edit_link = get_edit_post_link( $default_post->ID ); - $edit_link = add_query_arg( array( 'lang' => bbl_get_default_lang_code() ), $edit_link ); + $edit_link = esc_url( add_query_arg( array( 'lang' => bbl_get_default_lang_code() ), $edit_link ) ); bbl_switch_to_lang( bbl_get_default_lang_code() ); - $view_link = get_permalink( $default_post->ID ); + $view_link = esc_url( get_permalink( $default_post->ID ) ); bbl_restore_lang(); $edit_title = esc_attr( sprintf( __( 'Edit the originating post: ā€œ%sā€', 'babble' ), get_the_title( $default_post->ID ) ) ); $view_title = esc_attr( sprintf( __( 'View the originating post: ā€œ%sā€', 'babble' ), get_the_title( $default_post->ID ) ) ); diff --git a/templates-admin/translation-editor-terms.php b/templates-admin/translation-editor-terms.php index cd7cd9e..6b8eb9b 100644 --- a/templates-admin/translation-editor-terms.php +++ b/templates-admin/translation-editor-terms.php @@ -11,7 +11,7 @@

- +
name ); ?> @@ -24,7 +24,7 @@

- +
slug ); ?> @@ -38,7 +38,7 @@

- +