[wp-trac] [WordPress Trac] #3150: 'link to page' attachment
permalink incorrect, if using a relative WordPress URL
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 20 23:14:56 GMT 2006
#3150: 'link to page' attachment permalink incorrect, if using a relative
WordPress URL
----------------------------+-----------------------------------------------
Reporter: zjohnjohnz | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: Administration | Version: 2.0.4
Severity: normal | Keywords: attachment, link to page, relative URL
----------------------------+-----------------------------------------------
[version 2.04]
Under Options -> General, if set the WordPress address URL to a relative
path beginning with a slash, (e.g., "/wordpress-2.04"), then "link to
page" style attachment URLs are re-written incorrectly.
For example, this is what is inserted into the editor buffer for a link to
page attachment:
<a id="p13" rel="attachment" href="wordpress-2.04/2006/09/20/test3/ts4/"
title="ts4">ts4</a>
The href is missing the needed leading "/", however. Correct is:
a id="p13" rel="attachment" href="/wordpress-2.04/2006/09/20/test3/ts4/"
title="ts4">ts4</a>
Possible Fix:
It appears that the fix is extremely simple: on line 120 of
wp-includes/template-functions-links.php change 'trim' to 'rtrim'.
--
Ticket URL: <http://trac.wordpress.org/ticket/3150>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list