[wp-trac] [WordPress Trac] #38000: Visual mode editor is broken after update to 4.6.1

WordPress Trac noreply at wordpress.org
Fri Sep 9 12:46:43 UTC 2016


#38000: Visual mode editor is broken after update to 4.6.1
--------------------------+-----------------------------------------
 Reporter:  arnolem       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.6.2
Component:  Editor        |     Version:  4.6.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript, administration
--------------------------+-----------------------------------------

Comment (by arnolem):

 Replying to [comment:2 ocean90]:
 > @arnolem Welcome to Trac and thanks for your report!
 >
 > What are you using to minify the HTML in the admin?

 Thanks !

 I have a simple PHP function to minify all HTML elements in function.php
 You can see an example here :
 http://stackoverflow.com/questions/6225351/how-to-minify-php-page-html-
 output#answer-6225706

 You can rewrite it more simple
 {{{#!php
 <?php
 ob_start(function ($buffer) {
     return preg_replace([
         '/\>[^\S ]+/s',  // strip whitespaces after tags, except space
         '/[^\S ]+\</s',  // strip whitespaces before tags, except space
         '/(\s)+/s'       // shorten multiple whitespace sequences
     ], ['>','<','\\1'], $buffer);
 });
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38000#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list