[wp-trac] [WordPress Trac] #29159: user-agent checking is removing visual editor in function user_can_richedit

WordPress Trac noreply at wordpress.org
Sun Oct 12 17:01:40 UTC 2014


#29159: user-agent checking is removing visual editor in function user_can_richedit
--------------------------+------------------------------
 Reporter:  vmuryginIB    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  2.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by azaozz):

 From the post linked in the ticket:

  "This usually won’t be a problem, but if you have your frontend servers
 behind a proxy or load balancer that strips the user agent..."

 WordPress has to detect the user agent to properly output the textarea
 content depending on which editor is loaded first. It also doesn't make
 sense to load TinyMCE in browsers that don't support it.

 It is possible to add an exception in `user_can_richedit()` for this
 particular case. However the user agent is used in several other places to
 adjust the output, most notably in `wp_is_mobile()`. It is not possible to
 make the right assumption in these cases.

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


More information about the wp-trac mailing list