Skip to content

Commit

Permalink
add escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
iftakharul-islam committed Oct 24, 2024
1 parent 4a689aa commit f8ad0ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions inc/class-wp_recaptcha_recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function print_head() {
if ( $recaptcha_theme == 'custom' ) {
?><script type="text/javascript">
var RecaptchaOptions = {
theme : '<?php echo $recaptcha_theme ?>',
theme : '<?php echo esc_js( $recaptcha_theme ) ?>',
custom_theme_widget: 'recaptcha_widget'
};
</script><?php
Expand All @@ -101,9 +101,9 @@ public function print_head() {
<?php
$language_code = apply_filters( 'wp_recaptcha_language' , WP_reCaptcha::instance()->get_option( 'recaptcha_language' ) );
if ( $language_code ) { ?>
lang : '<?php echo $language_code ?>',
lang : '<?php echo esc_js($language_code) ?>',
<?php } ?>
theme : '<?php echo $recaptcha_theme ?>'
theme : '<?php echo esc_js($recaptcha_theme) ?>'

};
</script><?php
Expand Down
4 changes: 2 additions & 2 deletions inc/woocommerce/myaccount/form-lost-password.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<input type="password" class="input-text" name="password_2" id="password_2" />
</p>

<input type="hidden" name="reset_key" value="<?php echo isset( $args['key'] ) ? $args['key'] : ''; ?>" />
<input type="hidden" name="reset_login" value="<?php echo isset( $args['login'] ) ? $args['login'] : ''; ?>" />
<input type="hidden" name="reset_key" value="<?php echo isset( $args['key'] ) ? esc_attr( $args['key'] ) : ''; ?>" />
<input type="hidden" name="reset_login" value="<?php echo isset( $args['login'] ) ? esc_attr( $args['login'] ) : ''; ?>" />

<?php endif; ?>

Expand Down

0 comments on commit f8ad0ca

Please sign in to comment.