Changeset 37817
- Timestamp:
- 06/21/2016 02:56:08 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0/src/wp-admin/includes/post.php
r37782 r37817 1221 1221 1222 1222 if ( false === strpos( $permalink, '%postname%' ) && false === strpos( $permalink, '%pagename%' ) ) { 1223 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink. "</span>\n";1223 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . esc_html( $permalink ) . "</span>\n"; 1224 1224 if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) { 1225 1225 $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; … … 1240 1240 } 1241 1241 1242 $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged. '</span>';1243 $display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, $permalink);1242 $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . esc_html( $post_name_abridged ) . '</span>'; 1243 $display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, esc_html( $permalink ) ); 1244 1244 1245 1245 $return = '<strong>' . __( 'Permalink:' ) . "</strong>\n"; … … 1247 1247 $return .= '‎'; // Fix bi-directional text display defect in RTL languages. 1248 1248 $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-small hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __( 'Edit' ) . "</a></span>\n"; 1249 $return .= '<span id="editable-post-name-full">' . $post_name. "</span>\n";1249 $return .= '<span id="editable-post-name-full">' . esc_html( $post_name ) . "</span>\n"; 1250 1250 } 1251 1251 … … 1257 1257 $return .= "<span id='view-post-btn'><a href='" . esc_url( $preview_link ) . "' class='button button-small' target='wp-preview-{$post->ID}'>$view_post</a></span>\n"; 1258 1258 } else { 1259 $return .= "<span id='view-post-btn'><a href='" . get_permalink( $post) . "' class='button button-small'>$view_post</a></span>\n";1259 $return .= "<span id='view-post-btn'><a href='" . esc_url( get_permalink( $post ) ) . "' class='button button-small'>$view_post</a></span>\n"; 1260 1260 } 1261 1261 }
Note: See TracChangeset
for help on using the changeset viewer.