Ticket #18311: 18311.diff

File 18311.diff, 2.3 KB (added by sushkov, 15 months ago)

Fixed the git diff --no-prefix

Line 
1diff --git wp-includes/js/tinymce/plugins/wpeditimage/editimage.html wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
2index d7ad227..5627ee2 100644
3--- wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
4+++ wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
5@@ -103,7 +103,7 @@ if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') )
6                                </label>
7                        </th>
8                        <td class="field">
9-                               <input type="text" id="img_cap" name="img_cap" value="" size="60" />
10+                               <textarea id="img_cap" name="img_cap" value="" rows="4" cols="60"></textarea>
11                        </td>
12                </tr>
13 
14diff --git wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js
15index f79b625..8e9ae90 100644
16--- wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js
17+++ wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js
18@@ -143,7 +143,8 @@
19                                if ( ! w || ! cap ) return c;
20                               
21                                div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp';
22-
23+                               cap = cap.replace(/&#39;/gi, "'").replace(/&quot;/gi, '"');
24+       
25                                return '<div class="'+div_cls+'" draggable><dl id="'+id+'" class="wp-caption '+cls+'" style="width: '+(10+parseInt(w))+
26                                'px"><dt class="wp-caption-dt">'+c+'</dt><dd class="wp-caption-dd">'+cap+'</dd></dl></div>';
27                        });
28@@ -163,7 +164,7 @@
29 
30                                if ( ! w || ! cap ) return c;
31                                cls = cls.match(/align[^ '"]+/) || 'alignnone';
32-                               cap = cap.replace(/<\S[^<>]*>/gi, '').replace(/'/g, '&#39;').replace(/"/g, '&quot;');
33+                               cap = cap.replace(/'/g, '&#39;').replace(/"/g, '&quot;');
34 
35                                return '[caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/caption]';
36                        });
37diff --git wp-includes/media.php wp-includes/media.php
38index 89a3f36..dcc0263 100644
39--- wp-includes/media.php
40+++ wp-includes/media.php
41@@ -743,7 +743,7 @@ function img_caption_shortcode($attr, $content = null) {
42        if ( $id ) $id = 'id="' . esc_attr($id) . '" ';
43 
44        return '<div ' . $id . 'class="wp-caption ' . esc_attr($align) . '" style="width: ' . (10 + (int) $width) . 'px">'
45-       . do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>';
46+       . do_shortcode( $content ) . '<p class="wp-caption-text">' . html_entity_decode( $caption ) . '</p></div>';
47 }
48 
49 add_shortcode('gallery', 'gallery_shortcode');