Changeset 37815 for branches/4.1/src/wp-admin/includes/post.php
- Timestamp:
- 06/21/2016 02:55:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-admin/includes/post.php
r37781 r37815 1217 1217 1218 1218 if ( false === strpos( $permalink, '%postname%' ) && false === strpos( $permalink, '%pagename%' ) ) { 1219 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink. "</span>\n";1219 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . esc_html( $permalink ) . "</span>\n"; 1220 1220 if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) { 1221 1221 $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; … … 1236 1236 } 1237 1237 1238 $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged. '</span>';1239 $display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, urldecode( $permalink) );1238 $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . esc_html( $post_name_abridged ) . '</span>'; 1239 $display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, esc_html( urldecode( $permalink ) ) ); 1240 1240 1241 1241 $return = '<strong>' . __( 'Permalink:' ) . "</strong>\n"; … … 1243 1243 $return .= '‎'; // Fix bi-directional text display defect in RTL languages. 1244 1244 $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"; 1245 $return .= '<span id="editable-post-name-full">' . $post_name. "</span>\n";1245 $return .= '<span id="editable-post-name-full">' . esc_html( $post_name ) . "</span>\n"; 1246 1246 } 1247 1247 … … 1253 1253 $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"; 1254 1254 } else { 1255 $return .= "<span id='view-post-btn'><a href='" . get_permalink( $post) . "' class='button button-small'>$view_post</a></span>\n";1255 $return .= "<span id='view-post-btn'><a href='" . esc_url( get_permalink( $post ) ) . "' class='button button-small'>$view_post</a></span>\n"; 1256 1256 } 1257 1257 }
Note: See TracChangeset
for help on using the changeset viewer.