[wp-trac] [WordPress Trac] #43172: Output Buffering and <pre>

WordPress Trac noreply at wordpress.org
Tue Jan 30 03:37:37 UTC 2018


#43172: Output Buffering and <pre>
-------------------------------------+------------------------------
 Reporter:  briansahagun             |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  General                  |     Version:  4.9.2
 Severity:  normal                   |  Resolution:
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+------------------------------

Comment (by briansahagun):

 The second link shows that even in the HTML source, the content of <pre>
 has no formatting.

 Twenty Seventeen does not have any OB–what I meant to say is that I
 switched theme to ensure that the same content is ok without OB (as seen
 in Twenty Seventeen theme).

 I already tried putting the_content() outside OB (using my theme) and
 <pre> works as expected.

 But when put inside OB, the formatting gets discarded.

 Here it is:
 https://flic.kr/p/22xoLgD

 The first CSS is the_content() outside OB. The second CSS is within OB.

 Replying to [comment:3 SergeyBiryukov]:
 > Replying to [comment:2 briansahagun]:
 > > In the Visual/Text editor, everything seems ok. But when I publish it
 and view it using my theme (wherein I run the_content() inside ob_start()
 ), the formatting is removed.
 > >
 > > Please see images:
 > > https://www.flickr.com/gp/briansahagun/NWX0J1
 > > https://www.flickr.com/gp/briansahagun/798R62
 > >
 > > But when I switch to Twentyseventeen theme, the formatting is
 preserved.
 >
 > The second link shows a 403 error. If output buffering works as expected
 in Twenty Seventeen but not in your theme, it sounds like the issue is
 somewhere in your theme rather than in WordPress core. Could you track it
 down further?

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


More information about the wp-trac mailing list