Changeset 7924
- Timestamp:
- 05/13/08 16:02:12 (6 months ago)
- Files:
-
- trunk/wp-admin/quick-post.php (modified) (8 diffs)
- trunk/wp-includes/link-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/quick-post.php
r7923 r7924 31 31 $content = '<a href="' . $_REQUEST['photo_link'] . '" target="_new">'; 32 32 33 $content .= '<img src="' . $_REQUEST['photo_src'] . ' \style="float:left;padding:5px;">';33 $content .= '<img src="' . $_REQUEST['photo_src'] . '" style="float:left;padding:5px;">'; 34 34 35 35 if ($_REQUEST['photo_link']) … … 37 37 38 38 if ($_REQUEST['content']) 39 $content = $content . "<br clear=\"all\">". $_REQUEST['content'];39 $content = $content . '<br clear="all">' . $_REQUEST['content']; 40 40 41 41 break; 42 42 case "video": 43 43 list($garbage,$video_id) = split("v=", $_REQUEST['content']); 44 $content = "<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"http://www.youtube.com/v/" .$video_id ."\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/" .$video_id ."\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>";44 $content = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $video_id . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $video_id . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>'; 45 45 if ($_REQUEST['content2']) 46 $content = $content . "</br><p>" .$_REQUEST['content2'] ."</p>";46 $content = $content . '</br><p>' . $_REQUEST['content2'] . '</p>'; 47 47 break; 48 48 } … … 209 209 <div class="editor-container"> 210 210 <textarea name="content" id="photo_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo "" .stripslashes($_GET['s']);?> 211 <br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>211 <br><a href="<?php echo clean_url($_GET['u']);?>"><?php echo $title;?></a></textarea> 212 212 </div> 213 213 … … 286 286 <input type="submit" value="<?php _e('Create Photo') ?>" style="margin-top:15px;" onclick="document.getElementById('photo_saving').style.display = '';"/> 287 287 288 <a href="#" onclick="if (confirm(' Are you sure?')) { self.close(); } else { return false; }" style="color:#007BFF;">Cancel</a> 288 <a href="#" onclick="if (confirm('<?php _e('Are you sure?') ?>')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel') ?></a> 289 289 <img src="/images/bookmarklet_loader.gif" alt="" id="photo_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/> 290 290 </div> … … 322 322 323 323 <div> 324 <input type="submit" value=" Create Quote" style="margin-top:15px;" onclick="document.getElementById('quote_saving').style.display = '';"/> 325 <a href="#" onclick="if (confirm(' Are you sure?')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel') ?></a> 324 <input type="submit" value="<?php echo attribute_escape(__('Create Quote')) ?>" style="margin-top:15px;" onclick="document.getElementById('quote_saving').style.display = '';"/> 325 <a href="#" onclick="if (confirm('<?php _e('Are you sure?') ?>')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel') ?></a> 326 326 <img src="/images/bookmarklet_loader.gif" alt="" id="quote_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/> 327 327 </div> … … 350 350 list($domain, $video_id) = split("v=", $_GET['u']); 351 351 ?> 352 <input type="hidden" name="content" value="<?php echo $_GET['u']; ?>" />352 <input type="hidden" name="content" value="<?php echo attribute_escape($_GET['u']); ?>" /> 353 353 <img src="http://img.youtube.com/vi/<?php echo $video_id; ?>/default.jpg" align="right" style="border:solid 1px #aaa;" width="130" height="97"/><br clear="all" /> 354 354 <?php } else { ?> … … 360 360 361 361 <div class="editor-container"> 362 <textarea name="content2" id="video_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>362 <textarea name="content2" id="video_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br><a href="<?php echo clean_url($_GET['u']);?>"><?php echo $title;?></a></textarea> 363 363 </div> 364 364 … … 367 367 <div> 368 368 <input type="submit" value="<?php _e('Create Video') ?>" style="margin-top:15px;" onclick="document.getElementById('video_saving').style.display = '';"/> 369 <a href="#" onclick="if (confirm(' Are you sure?')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel'); ?></a> 369 <a href="#" onclick="if (confirm('<?php _e('Are you sure?') ?>')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel'); ?></a> 370 370 <img src="/images/bookmarklet_loader.gif" alt="" id="video_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/> 371 371 </div> trunk/wp-includes/link-template.php
r7919 r7924 745 745 function get_shortcut_link() { 746 746 $link = "javascript: 747 var imgstr=''; 748 var reg=new RegExp('&'); 749 for(i=0;i<document.images.length;i++){ 750 if(! reg.test(document.images[i].src)){ 751 imgstr = imgstr + document.images[i].src + ','; 752 } 753 } 754 var d=document; 755 var w=window; 756 var e=w.getSelection; 757 var k=d.getSelection; 758 var x=d.selection; 759 var s=(e?e():(k)?k():(x?x.createRange().text:0)); 760 var f='" . get_settings('siteurl') . '/wp-admin/quick-post.php' . "'; 761 var l=d.location; 762 var e=encodeURIComponent; 763 var p='?imagez='+imgstr; 764 var u= '&u=' + e(l.href); 765 var t= '&t=' + e(d.title); 766 var s= '&s=' + e(s); 767 var g= f+p+u+t+s; 768 769 function a(){ 770 if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){ 771 l.href=g; 772 } 773 } 774 if(/Firefox/.test(navigator.userAgent)){ 775 setTimeout(a,0); 776 }else{ 777 a(); 778 } 779 void(0);"; 747 var imgstr=''; 748 var reg=new RegExp('&'); 749 for(i=0;i<document.images.length;i++){ 750 if(! reg.test(document.images[i].src)){ 751 imgstr = imgstr + document.images[i].src + ','; 752 } 753 } 754 var d=document; 755 var w=window; 756 var e=w.getSelection; 757 var k=d.getSelection; 758 var x=d.selection; 759 var s=(e?e():(k)?k():(x?x.createRange().text:0)); 760 var f='" . get_settings('siteurl') . '/wp-admin/quick-post.php' . "'; 761 var l=d.location; 762 var e=encodeURIComponent; 763 var p='?imagez='+imgstr; 764 var u= '&u=' + e(l.href); 765 var t= '&t=' + e(d.title); 766 var s= '&s=' + e(s); 767 var g= f+p+u+t+s; 768 function a(){ 769 if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){ 770 l.href=g; 771 } 772 } 773 if(/Firefox/.test(navigator.userAgent)){ 774 setTimeout(a,0); 775 }else{ 776 a(); 777 } 778 void(0);"; 779 780 $link = str_replace(array("\r", "\n", "\t"), '', $link); 780 781 781 782 return apply_filters('shortcut_link', $link);
