From c55212cd14a0d34c1e3030aa3ffe59d592b77dc2 Mon Sep 17 00:00:00 2001 From: ozh Date: Wed, 26 Mar 2014 22:53:36 +0100 Subject: [PATCH] Make sprintf'ed strings sprintf-safe. Fixes #1665. --- includes/functions-html.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/functions-html.php b/includes/functions-html.php index e666ea7..0f61265 100644 --- a/includes/functions-html.php +++ b/includes/functions-html.php @@ -461,6 +461,7 @@ function yourls_table_edit_row( $keyword ) { $return = <<%s:
%s: $www
%s:   RETURN; + $return = preg_replace( '/%([^s])/', '%%$1', $return ); // make sprintf() safe: '%' -> '%%' $return = sprintf( urldecode( $return ), yourls__( 'Long URL' ), yourls__( 'Short URL' ), yourls__( 'Title' ), yourls__( 'Save' ), yourls__( 'Save new values' ), yourls__( 'Cancel' ), yourls__( 'Cancel editing' ) ); } else { $return = '' . yourls__( 'Error, URL not found' ) . ''; -- 2.45.0