Ticket #11119: press-this.002.diff
File press-this.002.diff, 1.8 KB (added by , 15 years ago) |
---|
-
wp-admin/press-this.php
91 91 } 92 92 93 93 // Set Variables 94 $title = isset( $_GET['t']) ? esc_html(aposfix(stripslashes($_GET['t']))) : '';95 $selection = isset( $_GET['s']) ? trim( aposfix( stripslashes($_GET['s']) ) ) : '';94 $title = isset( $_GET['t'] ) ? trim( strip_tags( aposfix( stripslashes( $_GET['t'] ) ) ) ) : ''; 95 $selection = isset( $_GET['s'] ) ? trim( htmlspecialchars( html_entity_decode( aposfix( stripslashes( $_GET['s'] ) ) ) ) ) : ''; 96 96 if ( ! empty($selection) ) { 97 97 $selection = preg_replace('/(\r?\n|\r)/', '</p><p>', $selection); 98 98 $selection = '<p>'.str_replace('<p></p>', '', $selection).'</p>'; 99 99 } 100 100 101 $url = isset($_GET['u']) ? esc_url($_GET['u']) : ''; 101 102 $image = isset($_GET['i']) ? $_GET['i'] : ''; 102 103 … … 119 120 <div class="postbox"> 120 121 <h2><label for="embed-code"><?php _e('Embed Code') ?></label></h2> 121 122 <div class="inside"> 122 <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo format_to_edit($selection, true); ?></textarea>123 <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo wp_htmledit_pre( $selection ); ?></textarea> 123 124 <p id="options"><a href="#" class="select button"><?php _e('Insert Video'); ?></a> <a href="#" class="close button"><?php _e('Cancel'); ?></a></p> 124 125 </div> 125 126 </div> … … 576 577 <div class="editor-container"> 577 578 <textarea name="content" id="content" style="width:100%;" class="theEditor" rows="15"><?php 578 579 if ( $selection ) 579 echo wp_richedit_pre( htmlspecialchars_decode($selection));580 echo wp_richedit_pre($selection); 580 581 if ( $url ) { 581 582 echo '<p>'; 582 583 if ( $selection )