diff --git a/src/wp-admin/options-media.php b/src/wp-admin/options-media.php
index 5d7483c5d8..f2be9f0579 100644
--- a/src/wp-admin/options-media.php
+++ b/src/wp-admin/options-media.php
@@ -112,7 +112,7 @@ if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
 		?>
 <tr>
 <th scope="row"><label for="upload_path"><?php _e( 'Store uploads in this folder' ); ?></label></th>
-<td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr( get_option( 'upload_path' ) ); ?>" class="regular-text code" />
+<td><input name="upload_path" type="text" id="upload_path" value="<?php form_option( 'upload_path' ); ?>" class="regular-text code" />
 <p class="description">
 		<?php
 		/* translators: %s: wp-content/uploads */
@@ -124,7 +124,7 @@ if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
 
 <tr>
 <th scope="row"><label for="upload_url_path"><?php _e( 'Full URL path to files' ); ?></label></th>
-<td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option( 'upload_url_path' ) ); ?>" class="regular-text code" />
+<td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php form_option( 'upload_url_path' ); ?>" class="regular-text code" />
 <p class="description"><?php _e( 'Configuring this is optional. By default, it should be blank.' ); ?></p>
 </td>
 </tr>
