Changeset 35341
- Timestamp:
- 10/21/2015 08:37:54 PM (9 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mce-view.js
r35216 r35341 733 733 */ 734 734 ( function( window, views, media, $ ) { 735 var base, gallery, av, embed; 735 var base, gallery, av, embed, 736 schema, parser, serializer; 737 738 function verifyHTML( string ) { 739 var settings = {}; 740 741 if ( ! window.tinymce ) { 742 return string.replace( /<[^>]+>/g, '' ); 743 } 744 745 if ( ! string || ( string.indexOf( '<' ) === -1 && string.indexOf( '>' ) === -1 ) ) { 746 return string; 747 } 748 749 schema = schema || new window.tinymce.html.Schema( settings ); 750 parser = parser || new window.tinymce.html.DomParser( settings, schema ); 751 serializer = serializer || new window.tinymce.html.Serializer( settings, schema ); 752 753 return serializer.serialize( parser.parse( string, { forced_root_block: false } ) ); 754 } 736 755 737 756 base = { … … 784 803 785 804 self.render( self.template( { 805 verifyHTML: verifyHTML, 786 806 attachments: attachments, 787 807 columns: attrs.columns ? parseInt( attrs.columns, 10 ) : media.galleryDefaults.columns -
trunk/src/wp-includes/js/wplink.js
r33591 r35341 383 383 } else { 384 384 if ( text ) { 385 editor.selection.setNode( editor.dom.create( 'a', attrs, text) );385 editor.selection.setNode( editor.dom.create( 'a', attrs, editor.dom.encode( text ) ) ); 386 386 } else { 387 387 editor.execCommand( 'mceInsertLink', false, attrs ); -
trunk/src/wp-includes/media-template.php
r34049 r35341 1217 1217 <# if ( attachment.caption ) { #> 1218 1218 <dd class="wp-caption-text gallery-caption"> 1219 {{ attachment.caption}}1219 {{{ data.verifyHTML( attachment.caption ) }}} 1220 1220 </dd> 1221 1221 <# } #>
Note: See TracChangeset
for help on using the changeset viewer.