WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#9132 closed defect (bug) (wontfix)

posts_nav_link() produces extra whitespace

Reported by: jidanni Owned by: anonymous
Priority: lowest Milestone:
Component: Template Version: 2.7
Severity: trivial Keywords:
Cc: jidanni@…

Description

A most tiny bug, but
posts_nav_link() produces extra whitespace. Though non-rendering, I
though you might want to know. I replaced it with a @ below so you
might notice it:

<a href="http://localhost/articles/"@>&laquo; Previous Page</a>
&#8212; <a href="http://localhost/articles/index.php/page/3"@>Next
Page &raquo;</a>
<a href="http://localhost/articles/index.php/page/2" >Next Page &raquo;</a>

Change History (2)

comment:1 jidanni4 years ago

  • Cc jidanni@… added

comment:2 sivel4 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

This is done so that extra attributes can be added to the link via a filter. Allowing that extra white space requires less code. To remove that white space would take at least 2 more lines of code one of which would be an if statement checking if $args is set or not. As this doesn't break any validation I cannot think of a reason that this needs to be fixed.

Note: See TracTickets for help on using tickets.