Opened 11 years ago
Last modified 7 years ago
#33834 new defect (bug)
wpautop treats html comments as content
| Reported by: | opajaap | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 4.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
This php code:
$str = '<div>My div1</div><!-- comment --><div>My div2</div>'; echo $str.'<br/>'.wpautop($str);
Produces this output as seen in the page source:
<div>My div1</div><!-- comment --><div>My div2</div><br/><div>My div1</div> <p><!-- comment --> <div>My div2</div>
I.e. unbalanced
<p>
and wrong layout.
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
There were some changes in #33645 regarding wpautop and HTML comments.
Can you confirm this still breaks when running trunk / a nightly build?