Opened 19 years ago
Closed 18 years ago
#4480 closed defect (bug) (wontfix)
Using two <br />'s in more text creates invalid markup
| Reported by: | huesforalice | Owned by: | pishmishy |
|---|---|---|---|
| Priority: | lowest | Milestone: | |
| Component: | Template | Version: | 2.2 |
| Severity: | minor | Keywords: | wpauto |
| Cc: | Focuses: |
Description
During theming I tried to call the the_content() function in my index.php in this way:
<?php the_content('<br /><br />Read the rest of this entry »'); ?>
Wordpress then produces output like this:
<a href="somelink" class="more-link"></p> <p>Read the rest of this entry »</a></p>
Which clearly is not valid xhtml.
When calling the_content only with one <br />:
<?php the_content('<br />Read the rest of this entry »'); ?>
All is ok.
Change History (7)
#1
@
19 years ago
- Summary Output of index.php not xhtml conform when enclosing to <br /> tags in the_content arguments → Output of index.php not xhtml conform when enclosing two <br /> tags in the_content arguments
#2
@
19 years ago
- Summary Output of index.php not xhtml conform when enclosing two <br /> tags in the_content arguments → Using two <br />'s in more text creates invalid markup
#6
@
19 years ago
- Owner changed from to
- Status new → assigned
huesforalice, I think that the best solution here would be for you to use the 'the_content' filter to remove the <p>.
The default filters for the_content such as autop could be moved so that they don't effect the more text, but that'll break things for people who wanted to use them to effect the more text.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I think the problem is that autop is applied after the more text is added on.