Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#4375 closed defect (bug) (invalid)

syntax bug in "more" (in post-template.php)

Reported by: bugreporter123's profile Bugreporter123 Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.1.3
Component: General Keywords:
Focuses: Cc:


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=""' 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="" 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...

Change History (1)

#1 @rob1n
17 years ago

  • Milestone 2.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Please upgrade. Neither 2.3 nor 2.2 have this issue.

Note: See TracTickets for help on using tickets.