Opened 17 years ago
Closed 17 years ago
#4375 closed defect (bug) (invalid)
syntax bug in "more" (in post-template.php)
Reported by: | Bugreporter123 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 2.1.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
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 »</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 »</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...
Please upgrade. Neither 2.3 nor 2.2 have this issue.