Changeset 37821
- Timestamp:
- 06/21/2016 02:58:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8/src/wp-admin/includes/post.php
r37787 r37821 1155 1155 1156 1156 if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { 1157 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink. "</span>\n";1157 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . esc_html( $permalink ) . "</span>\n"; 1158 1158 if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) 1159 1159 $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; 1160 1160 if ( isset( $view_post ) ) 1161 $return .= "<span id='view-post-btn'><a href=' $permalink' class='button button-small'>$view_post</a></span>\n";1161 $return .= "<span id='view-post-btn'><a href='" . esc_url( $permalink ) . "' class='button button-small'>$view_post</a></span>\n"; 1162 1162 1163 1163 $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); … … 1180 1180 } 1181 1181 1182 $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged. '</span>';1183 $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);1182 $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . esc_html( $post_name_abridged ) . '</span>'; 1183 $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, esc_html( $permalink ) ); 1184 1184 $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); 1185 1185 $return = '<strong>' . __('Permalink:') . "</strong>\n"; … … 1187 1187 $return .= '‎'; // Fix bi-directional text display defect in RTL languages. 1188 1188 $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"; 1189 $return .= '<span id="editable-post-name-full">' . $post_name. "</span>\n";1189 $return .= '<span id="editable-post-name-full">' . esc_html( $post_name ) . "</span>\n"; 1190 1190 if ( isset($view_post) ) 1191 $return .= "<span id='view-post-btn'><a href=' $view_link' class='button button-small'>$view_post</a></span>\n";1191 $return .= "<span id='view-post-btn'><a href='" . esc_url( $view_link ) . "' class='button button-small'>$view_post</a></span>\n"; 1192 1192 1193 1193 $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
Note: See TracChangeset
for help on using the changeset viewer.