[wp-trac] [WordPress Trac] #4375: syntax bug in "more" (in post-template.php)

WordPress Trac wp-trac at lists.automattic.com
Thu May 31 05:58:05 GMT 2007


#4375: syntax bug in "more" (in post-template.php)
----------------------------+-----------------------------------------------
 Reporter:  Bugreporter123  |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  normal          |   Milestone:  2.4      
Component:  General         |     Version:  2.1.3    
 Severity:  minor           |    Keywords:           
----------------------------+-----------------------------------------------
 I fixed a bug in the post-template.php file, but unfortunately forgot to
 save the "before" text.  But you should be able to figure it out from
 this:

 I noticed that when I was validating the XHTML code for my blog that I got
 an error wherever there was a "more" or "Continue reading" break.  What
 got generated looked something like this:

 <a href="http://www.blog.com/articlepath/"' class="more-link">Continue
 Reading &raquo;</a>

 Note the extra single quote after the href URL.

 I dug into the WordPress files, and found line 102 of post-template.php to
 have some problems.  After tinkering with it, what I'm using now is:

 $output .= '<a href="'. get_permalink() . '" class="more-
 link">'.$more_link_text.'</a>';

 Now, I'm a newbie to all of this, so I may not have done it 100% right
 (please check my syntax), but it seems to work perfectly.  What I get
 generated now is:

 <a href="http://www.blog.com/articlepath/" class="more-link">Continue
 Reading &raquo;</a>

 which works fine.

 Anyway, check it out.  If my syntax is OK, then just cut and paste into
 your files, and the bug's fixed...

 Apologies if this bug's a duplicate, I haven't upgraded in a while...

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4375>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list