Opened 15 years ago
Closed 14 years ago
#4480 closed defect (bug) (wontfix)
Using two <br />'s in more text creates invalid markup
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | minor | Version: | 2.2 |
Component: | Template | Keywords: | wpauto |
Focuses: | Cc: |
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
@
15 years ago
- Summary changed from Output of index.php not xhtml conform when enclosing to <br /> tags in the_content arguments to Output of index.php not xhtml conform when enclosing two <br /> tags in the_content arguments
#2
@
15 years ago
- Summary changed from Output of index.php not xhtml conform when enclosing two <br /> tags in the_content arguments to Using two <br />'s in more text creates invalid markup
#6
@
15 years ago
- Owner changed from anonymous to pishmishy
- Status changed from new to 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.
I think the problem is that autop is applied after the more text is added on.